diff --git a/README.md b/README.md index 042714c..2755ee4 100644 --- a/README.md +++ b/README.md @@ -35,21 +35,29 @@ Usage 2. Bind keyboard shortcuts to this script's functions: - # bind UP and DOWN arrow keys + ## Arrow Keys ########################################### + + # OPTION 1: for most systems zmodload zsh/terminfo bindkey "$terminfo[kcuu1]" history-substring-search-up bindkey "$terminfo[kcud1]" history-substring-search-down - # bind UP and DOWN arrow keys (compatibility fallback - # for Ubuntu 12.04, Fedora 21, and MacOSX 10.9 users) + # OPTION 2: for iTerm2 running on Apple MacBook laptops + zmodload zsh/terminfo + bindkey "$terminfo[cuu1]" history-substring-search-up + bindkey "$terminfo[cud1]" history-substring-search-down + + # OPTION 3: for Ubuntu 12.04, Fedora 21, and MacOSX 10.9 bindkey '^[[A' history-substring-search-up bindkey '^[[B' history-substring-search-down - # bind P and N for EMACS mode + ## EMACS mode ########################################### + bindkey -M emacs '^P' history-substring-search-up bindkey -M emacs '^N' history-substring-search-down - # bind k and j for VI mode + ## VI mode ############################################## + bindkey -M vicmd 'k' history-substring-search-up bindkey -M vicmd 'j' history-substring-search-down