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

Problem with motion commands defined using match-word-by-style used with vi-delete



When a motion command defined using match-word-by-style, e.g.,
forward-word-match or backward-word-match, is used together with
vi-delete, they won't use the style assigned to the  command in
question.  The reason is that the $curcontext is set to zle:vi-delete,
not, for example, zle:forward-word-match.

It seems that this issue can be quite hard to fix, considering how
vi-delete is currently implemented.  But perhaps there's an easy
solution that I was unable to spot.

Until then I'm going to use my own vi-delete that uses
matach-word-by-style internally instead of whatever it uses by
default.  This allows me to define the rather useful text-object
motion-commands that Vim has, e.g., "daw" to delete a word.

  n.o.w.



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