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:
Marty Oehme 2022-07-08 23:50:10 +02:00
parent cbb5256e27
commit 7356d8c58f
Signed by: Marty
GPG Key ID: B7538B8F50A1C800
1 changed files with 2 additions and 1 deletions

View File

@ -21,6 +21,7 @@ compinit
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/command-not-found/command-not-found.plugin.zsh
source /usr/share/fzf/key-bindings.zsh
#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
# these need to be sourced after fzf-tab
@ -171,7 +172,7 @@ bindkey '^P' history-beginning-search-backward
bindkey '^N' history-beginning-search-forward
# search history backwards <c-r>
bindkey '^r' history-incremental-search-backward
bindkey '^o' history-incremental-search-backward
# cycle through history results
bindkey -M isearch '^P' history-incremental-search-backward
bindkey -M isearch '^N' history-incremental-search-forward