From: William Scott <wgscott@chemistry.ucsc.edu>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: zsh-users@sunsite.dk
Subject: Re: vi mode and history-search key binding
Date: Sat, 27 May 2006 23:47:35 -0700 (PDT) [thread overview]
Message-ID: <Pine.OSX.4.61.0605272339510.20619@vanunu.ucsc.edu> (raw)
In-Reply-To: <060527221713.ZM25658@torch.brasslantern.com>
B
On Sat, 27 May 2006, Bart Schaefer wrote:
> On May 27, 8:39pm, William Scott wrote:
> }
> } bindkey '\e[A' vi-history-search-backward
> } bindkey '\e[B' vi-history-search-forward
>
> This binds those keys in the main keymap, which by default is the emacs
> keymap. Have you somewhere earlier in your startup files executed a
> "bindkey -v" command? If you did, then those bind keys in the viins
> keymap (insert mode), not the vicmd keymap (command mode). In which
> mode are you attempting to invoke the search?
>
> } It appears to have no effect. Is this intended?
>
> The effect you should see is that a quetion-mark (for backward) or slash
> (for forward) prompt appears below the PS1 prompt; you then enter the
> string to search for. If that doesn't happen, you've probably bound
> the keys in the wrong keymap.
>
Sorry, I misunderstood what vi-history-search-forward, etc, does.
bindkey -v
bindkey '\e[A' history-search-backward
bindkey '\e[B' history-search-forward
gives me the desired behavior.
Thanks for pointing out what should have been obvious. (I just issued
bindkey -v on the command line to experiment. I'm not sure what it says
about the ossified state of my brain, but even as a vi(m) user, I can't
seem to break the emacs keybinding habbits in the shell. It was far easier
to switch from tcsh to zsh. I'll give it the weekend.)
prev parent reply other threads:[~2006-05-28 6:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-28 3:39 William Scott
2006-05-28 5:17 ` Bart Schaefer
2006-05-28 6:47 ` William Scott [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=Pine.OSX.4.61.0605272339510.20619@vanunu.ucsc.edu \
--to=wgscott@chemistry.ucsc.edu \
--cc=schaefer@brasslantern.com \
--cc=zsh-users@sunsite.dk \
/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).