Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Troublesome Key Bindings
- X-seq: zsh-workers 13636
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx (Zsh hackers list)
- Subject: Re: Troublesome Key Bindings
- Date: Wed, 14 Mar 2001 17:33:46 +0000
- In-reply-to: <Tc0a88d0152492c5ed7@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <Tc0a88d0152492c5ed7@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
On Mar 14, 10:44am, Peter Stephenson wrote:
} Subject: Re: Troublesome Key Bindings
}
} "Zvi Har'El" <rl@xxxxxxxxxxxxxxxxxxx> wrote:
} > I am using zsh in vi insert mode (being an fanatic ViM user). After
} > doing compinit, which introduced many new key binding, I started
} > having troubles in history searches: Although most of the new
} > bindings have the prefix ^X, there are three with a prefix ^[, i.e.,
} > the escape character. These are
} >
} > "^[," _history-complete-newer
} > "^[/" _history-complete-older
These two bindings come from the #compdef line in _history_complete_word.
I don't recall why those keystrokes were chosen, but they're certainly
bad for vi mode.
There are a number of things we could do ... the most obvious would be to
simply remove the #compdef from _history_complete_word (replace it with
#autoload). Better perhaps would be to add -e and -v options to compdef
to specify the keymap in which the binding is to take place, but it might
be hard to come up with an unambiguous syntax for specifying different
bindings in the two modes with the same #compdef.
} So for the first two, you can simply use bindkey to map them to something
} else straight away:
} bindkey '^X/' _history-complete-older
Of course you also need to "bindkey -r" the old binding, as you're already
doing.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by:
Reverse Date,
Date,
Thread,
Author