From 7356d8c58f46b85e74ddb4700d46be9d06d14322 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 8 Jul 2022 23:50:10 +0200 Subject: [PATCH] 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. --- zsh/.config/zsh/.zshrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc index 62be501..c2b21d9 100644 --- a/zsh/.config/zsh/.zshrc +++ b/zsh/.config/zsh/.zshrc @@ -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 -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