From da75eb7e94d8d2472de34c195fa2b6c93b291334 Mon Sep 17 00:00:00 2001 From: Cyryl Plotnicki-Chudyk Date: Sat, 24 Jan 2015 16:52:06 +0100 Subject: [PATCH] history-substring-search key bindings for zsh --- .zshrc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.zshrc b/.zshrc index 0a4f6c86..7585f867 100644 --- a/.zshrc +++ b/.zshrc @@ -8,7 +8,6 @@ plugins=(vi-mode svn git python history-substring-search) source $ZSH/oh-my-zsh.sh -# Customize to your needs... HISTFILE=~/.histfile HISTSIZE=10240 SAVEHIST=10240 @@ -21,6 +20,13 @@ setopt completealiases zstyle ':completion::complete:*' use-cache 1 +# bind UP and DOWN arrow keys +zmodload zsh/terminfo +bindkey "$terminfo[cuu1]" history-substring-search-up +bindkey "$terminfo[cud1]" history-substring-search-down +bindkey -M vicmd 'k' history-substring-search-up +bindkey -M vicmd 'j' history-substring-search-down + if [[ `uname` == 'Darwin' ]]; then alias vim=/usr/local/Cellar/vim/7.4/bin/vim fi