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

Emulating vim's Ctrl-W behavior



Zsh likes to nuke my pipes when I delete backwards. For example, if I have
the line...

echo a | grep

...and I press Ctrl-W twice, then what I'd like to have (and what vim and
bash give me) is...

echo a

But zsh doesn't seem to count the pipe as a word, and the second Ctrl-W
plows through it and deletes the "a". Is there any way to configure zsh to
get vim's behavior? And related, is there a way to delete backwards to the
next slash in a path, as Ctrl-W does in vim, rather than deleting the whole
path? Thanks very much.

-- Jack O'Connor


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