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

Re: In Vi mode, show whether "insert" or "command" state is active



Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> writes:

> My vague idea was to have the value of N in %N(z..) refer to something
> about the keymap (where the example I gave is that %0(z) is true if the
> "main" keymap is selected and false otherwise).  Assign 1 to the emacs
> keymap, 2 to viins, 3 to vicmd, etc.; %0(z) and %2(z) might both be true
> when main is an alias for viins.  Obviously this is not perfect, but I
> haven't come up with a less grotesque alternative.

Perhaps %(z.viins.I.)%(z.main.N.)?

i.e. z.MODE.PRINT_IF_MODE.PRINT_ELSE.

-- 
Christian Neukirchen  <chneukirchen@xxxxxxxxx>  http://chneukirchen.org



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