From 2b6451de039067aee513e6898b264cd2408d2ba5 Mon Sep 17 00:00:00 2001 From: "Suraj N. Kurapati" Date: Fri, 5 May 2017 03:34:00 -0700 Subject: [PATCH] README: upgrade to CommonMark; move note up --- README.md | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 476dcd7..22d5db6 100644 --- a/README.md +++ b/README.md @@ -35,28 +35,27 @@ Usage Users typically bind their UP and DOWN arrow keys to this script, thus: * Run `cat -v` in your favorite terminal emulator to observe key codes. +      (**NOTE:** In some cases, `cat -v` shows the wrong key codes. If the + key codes shown by `cat -v` don't work for you, press `` and + `` at your ZSH command line prompt for correct key codes.) * Press the UP arrow key and observe what is printed in your terminal. * Press the DOWN arrow key and observe what is printed in your terminal. * Press the Control and C keys simultaneously to terminate the `cat -v`. * Use your observations from the previous steps to create key bindings. For example, if you observed `^[[A` for UP and `^[[B` for DOWN, then: - bindkey '^[[A' history-substring-search-up - bindkey '^[[B' history-substring-search-down + bindkey '^[[A' history-substring-search-up + bindkey '^[[B' history-substring-search-down - You might also want to bind the Control-P/N keys for use in EMACS mode: + You might also want to bind the Control-P/N keys for use in EMACS mode: - bindkey -M emacs '^P' history-substring-search-up - bindkey -M emacs '^N' history-substring-search-down + bindkey -M emacs '^P' history-substring-search-up + bindkey -M emacs '^N' history-substring-search-down - You might also want to bind the `k` and `j` keys for use in VI mode: + You might also want to bind the `k` and `j` keys for use in VI mode: - bindkey -M vicmd 'k' history-substring-search-up - bindkey -M vicmd 'j' history-substring-search-down - * (Note: There are cases, where `cat -v` lies to you. If the key codes - provided by `cat -v` didn't work for you, try pressing `` - and `` in the terminal and using the displayed key - codes instead.) + bindkey -M vicmd 'k' history-substring-search-up + bindkey -M vicmd 'j' history-substring-search-down 3. Type any part of any previous command and then: