Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Completion style like Vim
- X-seq: zsh-users 15551
- From: "Benjamin R. Haskell" <zsh@xxxxxxxxxx>
- To: Michael Treibton <mtreibton@xxxxxxxxxxxxxx>
- Subject: Re: Completion style like Vim
- Date: Tue, 16 Nov 2010 15:09:44 -0500 (EST)
- Cc: zsh-users@xxxxxxx
- In-reply-to: <AANLkTimRCvWA=0pchndFrkTF8Q0_gc4QA18JGD29Y-ti@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: <AANLkTimRCvWA=0pchndFrkTF8Q0_gc4QA18JGD29Y-ti@xxxxxxxxxxxxxx>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author