zsh-users
 help / color / mirror / code / Atom feed
From: Sepp Tannhuber <sepp.tannhuber@yahoo.de>
To: Julien Jehannet <julien@smaf.org>
Cc: "zsh-users@zsh.org" <zsh-users@zsh.org>
Subject: Re: vi-mode: editor function [solved]
Date: Thu, 15 May 2014 15:32:35 +0100 (BST)	[thread overview]
Message-ID: <1400164355.32638.YahooMailNeo@web172702.mail.ir2.yahoo.com> (raw)
In-Reply-To: <CADweS+YiAOZMeP_TrYDnOYZ3o0SQL0kr97eZas02OpV3KjVaAQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2373 bytes --]

Dear Julien,

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
Joseph
Julien Jehannet <julien@smaf.org> 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@yahoo.de>:

Dear Bart,
>
>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 
>  https://github.com/tannhuber/oh-my-zsh/blob/master/themes/budspencer.zsh-theme
>But don't waste your time. Everything is working well, now.
>
>Thank you
>Joseph
>Bart Schaefer <schaefer@brasslantern.com> 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 

      reply	other threads:[~2014-05-15 14:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-14 20:18 vi-mode: editor function Sepp Tannhuber
2014-05-15  1:48 ` Bart Schaefer
2014-05-15  9:50   ` vi-mode: editor function [solved] Sepp Tannhuber
2014-05-15 11:18     ` Julien Jehannet
2014-05-15 14:32       ` Sepp Tannhuber [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1400164355.32638.YahooMailNeo@web172702.mail.ir2.yahoo.com \
    --to=sepp.tannhuber@yahoo.de \
    --cc=julien@smaf.org \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).