Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: emacs-forward-word not emacs-like

On Tue, Oct 20, 2020 at 8:28 PM Nathan Phillip Brink
<ohnobinki@xxxxxxxxxxxxxxxxxx> wrote:
> I was trying to write input to a line and move my cursor about using
> M-f and M-b and deleting chunks at a time with M-d. [...]
> a-b-c d-e-f
> If my cursor is positioned at ‘a’ and I press M-f, bash and Emacs
> will move the cursor to point to the first dash ‘-’ (dash) (i.e., to
> immediately after the ‘a’). zsh’s emacs-forward-word will instead
> position the cursor immediately after ‘c’.

In addition to Lawrence's reference to WORDCHARS, please note that Zsh
generally emulates Gosling Emacs, whereas Bash is patterned more after
GNU Emacs.  (I await Chet Ramey's correction of any inaccuracy in the
latter assertion.)  The zsh bindings are also somewhat entangled with
the "stty" definitions of word motion, so that people moving to zsh
from the default terminal driver will not be surprised (although
that's a disappearing minority nowadays).

Messages sorted by: Reverse Date, Date, Thread, Author