@@ -35,28 +35,27 @@ Usage
3535
3636 Users typically bind their UP and DOWN arrow keys to this script, thus:
3737 * Run ` cat -v ` in your favorite terminal emulator to observe key codes.
38+ (** NOTE:** In some cases, ` cat -v ` shows the wrong key codes. If the
39+ key codes shown by ` cat -v ` don't work for you, press ` <C-v><UP> ` and
40+ ` <C-v><DOWN> ` at your ZSH command line prompt for correct key codes.)
3841 * Press the UP arrow key and observe what is printed in your terminal.
3942 * Press the DOWN arrow key and observe what is printed in your terminal.
4043 * Press the Control and C keys simultaneously to terminate the ` cat -v ` .
4144 * Use your observations from the previous steps to create key bindings.
4245 For example, if you observed ` ^[[A ` for UP and ` ^[[B ` for DOWN, then:
4346
44- bindkey '^[[A' history-substring-search-up
45- bindkey '^[[B' history-substring-search-down
47+ bindkey '^[[A' history-substring-search-up
48+ bindkey '^[[B' history-substring-search-down
4649
47- You might also want to bind the Control-P/N keys for use in EMACS mode:
50+ You might also want to bind the Control-P/N keys for use in EMACS mode:
4851
49- bindkey -M emacs '^P' history-substring-search-up
50- bindkey -M emacs '^N' history-substring-search-down
52+ bindkey -M emacs '^P' history-substring-search-up
53+ bindkey -M emacs '^N' history-substring-search-down
5154
52- You might also want to bind the ` k ` and ` j ` keys for use in VI mode:
55+ You might also want to bind the `k` and `j` keys for use in VI mode:
5356
54- bindkey -M vicmd 'k' history-substring-search-up
55- bindkey -M vicmd 'j' history-substring-search-down
56- * (Note: There are cases, where ` cat -v ` lies to you. If the key codes
57- provided by ` cat -v ` didn't work for you, try pressing ` <C-v><UP> `
58- and ` <C-v><DOWN> ` in the terminal and using the displayed key
59- codes instead.)
57+ bindkey -M vicmd 'k' history-substring-search-up
58+ bindkey -M vicmd 'j' history-substring-search-down
6059
61603 . Type any part of any previous command and then:
6261
0 commit comments