Zsh Mailing List Archive
Messages sorted by:
Re: vi-mode: editor function [solved]
I didn't know the ZLE_STATE variable before. There's also the KEYMAP variable with the two modes "main" and "vicmd". The combination of both variables does the trick. It seems a little bit weird that both variables cannot show all three modes correctly.
Thank you very much
Julien Jehannet <julien@xxxxxxxx> schrieb am 13:28 Donnerstag, 15.Mai 2014:
FWIW, you could simplify your builtin redefinitions by using the ZLE_STATE variable.
Changes from 4.3.11:
The parameter ZLE_STATE, available in user-defined line editor widgets,
gives information on the state of the line editor. Currently this is
whether the line editor is in insert or overwrite mode.
2014-05-15 11:50 GMT+02:00 Sepp Tannhuber <sepp.tannhuber@xxxxxxxx>:
>thank you for the hint. Indeed, I found an edit-command-line module in zshcontrib.
>And yes, it is loaded by oh-my-zsh. So I could fix my theme script.
>Unfortunately, I have no idea how to set the MODE variable the way you mentioned.
>If anybody wants to tell me, you can find the script at
>But don't waste your time. Everything is working well, now.
>Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> schrieb am 3:50 Donnerstag, 15.Mai 2014:
>On May 14, 9:18pm, Sepp Tannhuber wrote:
>} Subject: vi-mode: editor function
>} I have written a theme for the oh-my-zsh prompt from robbyrussel
>} because I was sometimes confused about the different vi modes. My
>} prompt shows, at a glance, which vi mode is active, similar to the vim
>} airline plugin.
>} Unfortunately I could not find something like vi-editor it in the
>} zshzle manual. Has anybody an idea what I can use instead? Or what is
>} the default vicmd for [v]?
>There is no default binding for v in vicmd mode, so you are encountering
>something installed for you by oh-my-zsh. Most likely it is the user-
>contributed edit-command-line widget (man zshcontrib).
>If oh-my-zsh hasn't already pre-empted the zle-line-init, zle-line-finish,
>and zle-keymap-select widgets, you might find it more effective to set the
>MODE variable with those, rather than trying to override all the individual
>widgets that might change mode.
J u l i e n J e h a n n e t
Messages sorted by: