From: "Benjamin R. Haskell" <zsh@benizi.com>
To: Michael Treibton <mtreibton@googlemail.com>
Cc: zsh-users@zsh.org
Subject: Re: Completion style like Vim
Date: Tue, 16 Nov 2010 15:09:44 -0500 (EST) [thread overview]
Message-ID: <alpine.LNX.2.01.1011161503010.2792@hp> (raw)
In-Reply-To: <AANLkTimRCvWA=0pchndFrkTF8Q0_gc4QA18JGD29Y-ti@mail.gmail.com>
On Tue, 16 Nov 2010, Michael Treibton wrote:
> Hi all,
>
> I'm wondering how i can get vim-like completion with zsh, and even if
> it's possible?
>
> For those who don't know, vim allows completion to happen on one line,
> so if I have entered the following commands:
>
> foobar hello
> bar baz hello
> zsh is cool
> zsh is really cool
>
> ... and I were to type in:
>
> zsh is
>
> and then press the up or down arrow keys, I would see as completion:
>
> zsh is cool
> zsh is really cool
>
> which would be cycled through on the single line -- that is, without
> presenting the completion menu.
>
> Is something like this possible with zsh (and I assume zle?) Note
> that I already use the following bindings:
>
> bindkey '\e[5~' beginning-of-buffer-or-history
> bindkey '\e[6~' end-of-buffer-or-history
> bindkey "^[n" history-search-forward
> bindkey "^[p" history-search-backward
>
> Which don't quite do what I want.
>
> Is this possible at all? I hope I've explained this well enough.
That's not how my Vim completion works. (Big fan of the popupmenu and
supertab.) I guess you like i_CTRL-X_CTRL-L? I much prefer
i_CTRL-X_CTRL-O for the general case, falling back to i_CTRL-X_CTRL-I.
(Both of which I access via '<Tab>'.)
>From your description, though, I think you're looking for:
history-beginning-search-{forward,backward}
(Someone complained about the name recently, but the gist of
'beginning-' is that it searches from the beginning of the line entered
thus far.)
--
Best,
Ben
next prev parent reply other threads:[~2010-11-16 20:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-16 19:57 Michael Treibton
2010-11-16 20:09 ` Benjamin R. Haskell [this message]
[not found] ` <AANLkTimqY0yVW-uHNi_pKMYRjTZJ7a1CamENMs2CpCQs@mail.gmail.com>
[not found] ` <alpine.LNX.2.01.1011161606310.2792@hp>
2010-11-16 21:21 ` Benjamin R. Haskell
2010-11-17 22:43 ` Michael Treibton
2011-01-20 21:02 ` Michael Treibton
2011-01-20 22:02 ` Benjamin R. Haskell
2011-01-20 22:14 ` Michael Treibton
2011-01-23 4:56 ` Bart Schaefer
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=alpine.LNX.2.01.1011161503010.2792@hp \
--to=zsh@benizi.com \
--cc=mtreibton@googlemail.com \
--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).