Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: bck-search in vicmd is not thinking vi-style
- X-seq: zsh-users 14985
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Maryam <darwinskernel@xxxxxxxxx>
- Subject: Re: bck-search in vicmd is not thinking vi-style
- Date: Thu, 8 Apr 2010 22:22:31 +0200
- Cc: zsh-users@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:cc:content-type; bh=QkPCbghKcXsS2N4c2jPxft5FtbthyAeXrf7YL1W+Vfo=; b=c69/Nd3anIh92bm/Vpc4AKI/M0ShhdoaiNFJjFq1BgIxcdJjvBRaj/9LcRSgiZ6QUu j45w3sa44j1lP2yCLQul6843SY8NE3hxrr3XL1K9ytAbx2Q9QsUJBbiFfhUGR91Y0RKd AvH+zAHOoQzc8HqEHkDdT/uYq/FSvAovtn24Y=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=ck0PK3UmLNJUzFsRhPJB/P+tFegqnHRPNpbHEki4c+tGdi42gmWU4CbKmkVs3fJNwz SJLnf8Y9r0F//hDdnxsAgxbRBSsyVGaLSlh0o8P4oeVw2H2iqvH38x658baWYWaavqUx 6Q9uXGIwFy90S6+F7i6J9zkorVhmssovb1q+M=
- In-reply-to: <j2ga9a51b1a1004081312w103b21e1ma5083cf6bb0a5399@xxxxxxxxxxxxxx>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <k2pa9a51b1a1004070855lc0d017b3n5599a7a5aeec60a4@xxxxxxxxxxxxxx> <20100408093502.GH14766@xxxxxxxxx> <j2ga9a51b1a1004081312w103b21e1ma5083cf6bb0a5399@xxxxxxxxxxxxxx>
On 8 April 2010 22:12, Maryam <darwinskernel@xxxxxxxxx> wrote:
> On Thu, Apr 8, 2010 at 5:35 AM, Thor Andreassen <ta@xxxxxxxxx> wrote:
>> On Wed, Apr 07, 2010 at 11:55:17AM -0400, Maryam wrote:
>>> 10:56 < glphvgacs> ft: hi, while user isearches in vicmd mode; is it
>>> possible to hit some key (tab?) to run through the possible hits
>>> (something like menu-completion)?
>>> 11:22 < glphvgacs> a key for reapeating bck-i-search that is not
>>> emac-style i.e. '^r'
>>> 11:24 < Mikachu> you can bind keys in the isearch keymap
>>> 11:24 < Mikachu> if that helps
>>> 11:27 < glphvgacs> Mikachu: I have this bindkey -M vicmd 'f'
>>> history-incremental-search-backward
>>> 11:27 < Mikachu> obviously you can't use f in isearch since i assume
>>> you want to be able to type f
>>> 11:27 < glphvgacs> but that's just to start isearch
>>> 11:27 < Mikachu> but you could try bindkey -M isearch '^I'
>>> history-incremental-search-backward
>>> 11:32 < glphvgacs> vimperator guys have a nice feature to open a
>>> location; user hits 'o' and starts typing then user gets a list of
>>> possible completions and then (here is the good part) user can <tab>
>>> through the results. i don't think i can search for <tab> in my search
>>> history so having that key doing nothing during bck-search and then
>>> introducing an extra key to hold (in the case of '^r' or as you
>>> suggested '^I') seems redundant, i think
>>> 11:34 < glphvgacs> i mean then whole idea of going vicmd to me at
>>> least to to get rid of that extra '^' in emacs, to thing vi as opposed
>>> to emacs, right?
>>> 11:34 < Mikachu> ^I is tab
>>> 11:34 -!- bapt is now known as aigrbapt
>>> 11:34 < glphvgacs> nice
>>> 11:34 < Mikachu> it took me a while to realize that isn't immediately
>>> obvious to everyone
>>> 11:36 < glphvgacs> so empty line + ^I brings up bck-search
>>> 11:36 < glphvgacs> i was thinking I as in Increment
>>> 11:36 < glphvgacs> thnx
>>> 11:36 < Mikachu> after going into the searhc mode, pressing tab should
>>> be the same as pressing ctrl-r again in emacs mode
>>> 11:37 * Mikachu disappears
>>> 11:37 < glphvgacs> yeah, not really
>>> 11:38 < glphvgacs> it doesn't do what i wanted but still a nice touch
>>>
>>> Can someone help me figure this out? thnx.
>>
>> Doing:
>>
>> bindkey -M vicmd "f" history-incremental-search-backward
>> bindkey -M isearch "^I" history-incremental-search-backward
>
> it does indeed; thnx.
Isn't this precisely what I suggested in our irc conversation? :)
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author