Add zsh-history-substring-search
This commit is contained in:
parent
6f67aa14e3
commit
473e1d220a
1 changed files with 26 additions and 0 deletions
26
zshrc
26
zshrc
|
@ -49,6 +49,11 @@ plugins=(sudo git git-flow brew)
|
|||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
# User configuration
|
||||
# history
|
||||
SAVEHIST=100000
|
||||
|
||||
# vim binddings
|
||||
bindkey -v
|
||||
|
||||
# Source the untracked `extra` file
|
||||
test -e $HOME/.extra && source $HOME/.extra
|
||||
|
@ -71,6 +76,27 @@ test -e /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh \
|
|||
test -e /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh \
|
||||
&& source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
|
||||
# ZSH history substring search
|
||||
bindKeysZshHistoryOSX() {
|
||||
zmodload zsh/terminfo
|
||||
bindkey "$terminfo[kcuu1]" history-substring-search-up
|
||||
bindkey "$terminfo[kcud1]" history-substring-search-down
|
||||
}
|
||||
|
||||
bindKeysZshHistoryLinux() {
|
||||
zmodload zsh/terminfo
|
||||
bindkey "$terminfo[cuu1]" history-substring-search-up
|
||||
bindkey "$terminfo[cud1]" history-substring-search-down
|
||||
}
|
||||
|
||||
test -e /usr/local/opt/zsh-history-substring-search/zsh-history-substring-search.zsh \
|
||||
&& source /usr/local/opt/zsh-history-substring-search/zsh-history-substring-search.zsh
|
||||
test -e /usr/opt/zsh-history-substring-search/zsh-history-substring-search.zsh \
|
||||
&& source /usr/opt/zsh-history-substring-search/zsh-history-substring-search.zsh
|
||||
|
||||
test "$platform" = 'osx' && bindKeysZshHistoryOSX
|
||||
test "$platform" = 'linux' && bindKeysZshHistoryLinux
|
||||
|
||||
# You may need to manually set your language environment
|
||||
export LANG=en_GB.UTF-8
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue