From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13546 invoked by alias); 15 May 2014 11:26:52 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 18817 Received: (qmail 13608 invoked from network); 15 May 2014 11:26:38 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=qkzpkQy7jpbzEK55IK9skIoIcup+GHXbrncu1ju/n/c=; b=A6Z0JxFHOf/UIO982CVj59p1TvNg0wRkwkU6XSNy/Xzrj189pVTVMSnQY1oXpIqOGg bC8+SN18nQmzf+bYGOTS3Qgd33EHTBykOIgOXUNjGiQm8XQorsHJ15J2TWpuZ/8LP04/ xe2jlNdJ/y6dyn/GNZW4C3T5q2roE1h+o1+Jl+nL3g+Vk9bN326yRpGa9TeHMkhYdjeH CxwzaKqOhgAr6KU427v+UtyuTAQqlPHaKnZyBEb74/PPGhurAq8PB5W/NtQw7QB3CmXw qLHAbDIMeklYMHgzfhq8V9gZOKBbGb0JtbQ7h7TnKzUhS+64y0+HckzPMxe7zhnZesIG JUUQ== X-Gm-Message-State: ALoCoQkSZ3XZcQmQdWqP2mYlX+YDl4f0uMOEkF9mnxP0Pc1rdJuOWceAhFKIlIOQHJzOjYd6glOP X-Received: by 10.180.160.166 with SMTP id xl6mr8175769wib.42.1400152729687; Thu, 15 May 2014 04:18:49 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1400147444.59377.YahooMailNeo@web172703.mail.ir2.yahoo.com> References: <1400098682.27302.YahooMailNeo@web172703.mail.ir2.yahoo.com> <140514184807.ZM24732@torch.brasslantern.com> <1400147444.59377.YahooMailNeo@web172703.mail.ir2.yahoo.com> From: Julien Jehannet Date: Thu, 15 May 2014 13:18:29 +0200 Message-ID: Subject: Re: vi-mode: editor function [solved] To: Sepp Tannhuber Cc: "zsh-users@zsh.org" Content-Type: multipart/mixed; boundary=047d7b66f9cb15ced504f96e769c --047d7b66f9cb15ced504f96e769c Content-Type: multipart/alternative; boundary=047d7b66f9cb15ced004f96e769a --047d7b66f9cb15ced004f96e769a Content-Type: text/plain; charset=UTF-8 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 : > 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 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 --047d7b66f9cb15ced004f96e769a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
FWIW, you could simplify your builtin redefinitions by usi= ng the ZLE_STATE variable.

Changes from 4.3.11:
The paramete= r ZLE_STATE, available in user-defined line editor = widgets,
gives information on the state of the line editor. = =C2=A0Currently 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 zshc= ontrib.
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 ment= ioned.
If anybody wants to tell me, you can find the script at=C2=A0
=C2=A0 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@bra= sslantern.com> schrieb am 3:50 Donnerstag, 15.Mai 2014:

On May 14,=C2=A0 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.=C2=A0 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-fini= sh,
and zle-keymap-select widgets, you might find it more effective to set the<= br> MODE variable with those, rather than trying to override all the individual=
widgets that might change mode.


--
J u l i e n=C2=A0 =C2=A0 J e h a n n e t
--047d7b66f9cb15ced004f96e769a-- --047d7b66f9cb15ced504f96e769c Content-Type: text/x-diff; charset=US-ASCII; name="budspencer.zsh-theme.patch" Content-Disposition: attachment; filename="budspencer.zsh-theme.patch" Content-Transfer-Enc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