zsh: Use fzf for c-r, c-t and a-c binds
Make fzf the default for searching history with c-r in zsh. The incremental history searfch has been moved to c-o instead. Also can insert a directory path at cursor position with binding c-t using fzf, and cd into a directory using alt-c. Will use these less often but they're part of the package and should not be in the way as well.
This commit is contained in:
parent
cbb5256e27
commit
7356d8c58f
1 changed files with 2 additions and 1 deletions
|
@ -21,6 +21,7 @@ compinit
|
||||||
PLUG_FOLDER="/usr/share/zsh/plugins"
|
PLUG_FOLDER="/usr/share/zsh/plugins"
|
||||||
source /usr/share/oh-my-zsh/plugins/colored-man-pages/colored-man-pages.plugin.zsh
|
source /usr/share/oh-my-zsh/plugins/colored-man-pages/colored-man-pages.plugin.zsh
|
||||||
source /usr/share/oh-my-zsh/plugins/command-not-found/command-not-found.plugin.zsh
|
source /usr/share/oh-my-zsh/plugins/command-not-found/command-not-found.plugin.zsh
|
||||||
|
source /usr/share/fzf/key-bindings.zsh
|
||||||
#source /usr/share/nvm/init-nvm.sh
|
#source /usr/share/nvm/init-nvm.sh
|
||||||
[ -e $PLUG_FOLDER/fzf-tab/fzf-tab.plugin.zsh ] && source $PLUG_FOLDER/fzf-tab/fzf-tab.plugin.zsh
|
[ -e $PLUG_FOLDER/fzf-tab/fzf-tab.plugin.zsh ] && source $PLUG_FOLDER/fzf-tab/fzf-tab.plugin.zsh
|
||||||
# these need to be sourced after fzf-tab
|
# these need to be sourced after fzf-tab
|
||||||
|
@ -171,7 +172,7 @@ bindkey '^P' history-beginning-search-backward
|
||||||
bindkey '^N' history-beginning-search-forward
|
bindkey '^N' history-beginning-search-forward
|
||||||
|
|
||||||
# search history backwards <c-r>
|
# search history backwards <c-r>
|
||||||
bindkey '^r' history-incremental-search-backward
|
bindkey '^o' history-incremental-search-backward
|
||||||
# cycle through history results
|
# cycle through history results
|
||||||
bindkey -M isearch '^P' history-incremental-search-backward
|
bindkey -M isearch '^P' history-incremental-search-backward
|
||||||
bindkey -M isearch '^N' history-incremental-search-forward
|
bindkey -M isearch '^N' history-incremental-search-forward
|
||||||
|
|
Loading…
Reference in a new issue