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

Re: Suggestion: forward-delete-word



On Mon, Sep 24, 2018 at 12:00 PM Jérémie Roquet <jroquet@xxxxxxxxxxxxx> wrote:
>
> 2018-09-24 20:29 GMT+02:00 Noam Barnea <thekittendev@xxxxxxxxx>:
> > There are many widgets that go backwards and erase some amount of text:
> > backward-delete-char, backward-delete-word, backward-kill-line, and
> > backward-kill-word. But, there are no such widgets going forward.
>
> These gadgets actually do exist already, except they are called
> delete-char, delete-word, kill-line, kill-word, etc.
>
> I've been confused by the asymmetry in the names too. Historical
> reasons, I guess… The names are the same in Emacs, by the way.

They're named the way they are in zsh BECAUSE they were first named
that way in emacs.  ZLE's default mode is supposed to be an emacs
emulation (emacs from about 1992 plus a bunch of special cases for
shell tasks, to be more precise).

You can also get forward motions by typing ESC - (that's two
characters, escape and hypen (minus)) before typing the character for
a backward motion, i.e., ESC - ^H deletes forward one character, ESC -
^W deletes forward one word.



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