zsh-workers
 help / color / mirror / code / Atom feed
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: Sebastian Gniazdowski <sgniazdowski@gmail.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: backward-kill-shell-word widget
Date: Sun, 10 Jan 2016 19:59:43 +0000	[thread overview]
Message-ID: <20160110195943.GB11464@tarsus.local2> (raw)
In-Reply-To: <CAKc7PVBuSXQfu=cJZekc-nr-tFtk2dd1tzKL3x8GD0APKoNQQg@mail.gmail.com>

Sebastian Gniazdowski wrote on Sun, Jan 10, 2016 at 14:37:26 +0100:
> I see that you use (z) flag :) I think this is cool. I just was about
> to decide to bind shell-worded transpose-words-match to Alt-r (have
> transpose-segment bound to Alt-t) and noticed that I rather want to
> keep select-word-style bash. I rather want Ctrl-W to delete normal
> words. So with your function one can have:
> - "Ctrl-W" / backward-kill-word to delete word with style of his choice
> - transpose-words-match to swap words with style of his choice,
> keeping in mind to position cursor at beginning of the words
> - "Alt-m" / copy-prev-shell-word to copy shell word regardless of word style
> - "Ctrl-T" / backward-kill-shell-word to delete shell word regardless
> of word style
> - "Alt-t" / my transpose-segment to swap shell words regardless of
> word style (should I rename the widget to "transpose-shell-word",
> looks like yes)
> - "Alt-/" / _history-complete-older to complete shell words regardless
> of word style
> 
> I think this goes into a nice workbench for quick manipulation of
> command line, if one devotes time to establish order in that set of
> loosely coupled functionalities.

Don't put too much weight on my choice of <C-T> for b-k-s-word.  It's
not my preferred choice for b-k-s-word, it's simply the chord I always
use for testing widgets.

As to the general issue, I'd consider some more systematic approach.  Vi
has its operators; you could have something similar by having a "prefix
key" that chooses the word style: e.g., <C-T><w> or <C-T><C-W> would
"delete a shell word backwards", <C-Y><w> or <C-Y><C-W> would "delete
a whitespace-separated word backwards", and plain <C-W> would delete
a default-styled word backwards.

And of course a NUMERIC could be prepended to any of those, just as with
vi operators.

How does emacs handle this issue?  Does emacs have different chords for
different kinds of "delete a word backwards"?


  reply	other threads:[~2016-01-10 19:59 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-01  0:37 Daniel Shahaf
2016-01-10  7:42 ` Sebastian Gniazdowski
2016-01-10  7:54   ` Sebastian Gniazdowski
2016-01-10 20:13   ` Daniel Shahaf
2016-01-10 13:37 ` Sebastian Gniazdowski
2016-01-10 19:59   ` Daniel Shahaf [this message]
2016-01-10 21:06     ` Bart Schaefer
2016-01-12  8:23   ` Bart Schaefer
2016-01-10 15:50 ` Sebastian Gniazdowski
2016-01-10 20:19   ` Daniel Shahaf
2016-01-11  8:05     ` Sebastian Gniazdowski
2016-01-12 10:36       ` Sebastian Gniazdowski
2016-01-13  1:18       ` Daniel Shahaf
2016-01-13  8:38         ` Sebastian Gniazdowski
2016-01-14  0:13           ` Daniel Shahaf
2016-01-14  6:54             ` Bart Schaefer
2016-01-15  6:26               ` Daniel Shahaf
2016-01-10 17:17 ` Bart Schaefer
2016-01-10 19:53   ` Daniel Shahaf
2016-01-12  7:54     ` Bart Schaefer
2016-04-14 16:21   ` Bart Schaefer
2016-07-08 14:19   ` Oliver Kiddle
2016-01-11 11:53 ` Sebastian Gniazdowski
2016-01-12  6:59   ` Bart Schaefer
2016-01-12  7:49     ` Sebastian Gniazdowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160110195943.GB11464@tarsus.local2 \
    --to=d.s@daniel.shahaf.name \
    --cc=sgniazdowski@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).