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

vi-kill-word widget/function which respects $WORDCHARS



I've been fiddling with my bindings, and I bumped into the various vi
bindings, which all seem to respect my $WORDCHARS

That includes bindings like:
 bindkey '^[^?' vi-backward-kill-word

However, I'm interested in some sort of 'vi-kill-word' to kill the
current word (in the forward direction), while still respecting
$WORDCHARS (kill-word does not). Is there such a widget?


I've been hunting around, but I haven't been able to come up with a
solution to this.

I also looked through the list of widgets in the documentation, and
when I highlighted 'kill' I didn't see anything which could serve this
purpose.
http://chronos.cs.msu.su/zsh-man/zsh_19.html
Maybe I should read more thoroughly, perhaps there is some other widget
which could do what I want?


Should I be considering making a function like this?
- kill the current word with 'kill-word'
- apply the word separator to the kill buffer
- spit out the remainder into the command line

Has anyone else done something like that?



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