dotfiles/shells/zsh/lib/fish.zsh

23 lines
846 B
Bash
Raw Normal View History

2019-07-22 16:21:32 +10:00
source $FRESH_PATH/build/vendor/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# source $FRESH_PATH/build/vendor/history-substring-search/zsh-history-substring-search.zsh
2013-11-12 15:24:58 +11:00
# bind UP and DOWN arrow keys
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down
# bind UP and DOWN arrow keys in other terms (was needed in Windows Terminal)
bindkey '^[OA' history-substring-search-up
bindkey '^[OB' history-substring-search-down
2019-07-22 16:21:32 +10:00
# Bind control + LEFT and RIGHT arrow keys to jump by word
bindkey "^[[1;5C" forward-word
bindkey "^[[1;5D" backward-word
2013-11-12 15:24:58 +11:00
# bind P and N for 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
bindkey -M vicmd 'k' history-substring-search-up
bindkey -M vicmd 'j' history-substring-search-down