# shellcheck shell=bash # vim: ft=sh # Navi if command -v navi > /dev/null 2>&1; then zinit snippet https://github.com/denisidoro/navi/blob/master/shell/navi.plugin.zsh function magic-ctrl-g { if ! (( $#BUFFER )) && [[ "$CONTEXT" == start ]]; then _navi_widget; fi } zle -N magic-ctrl-g bindkey '^G' magic-ctrl-g fi # FZF #{{{ if command -v fzf > /dev/null 2>&1; then function magic-ctrl-f { if ! (( $#BUFFER )) && [[ "$CONTEXT" == start ]]; then fzf-file-widget; fi } zle -N magic-ctrl-f bindkey '^F' magic-ctrl-f zinit ice wait'1' lucid light-mode depth'1' \ atload"bindkey '^H' fzf-history; \ bindkey '^Z' fzf-kill-proc-by-list" zinit light amaya382/zsh-fzf-widgets ZSH_FZF_PASTE_KEY=enter ZSH_FZF_EXEC_KEY=ctrl-r fi #}}} zinit wait'1' lucid light-mode depth'1' for \ atload"bindkey '^[[A' history-substring-search-up; \ bindkey '^[[B' history-substring-search-down" \ zsh-users/zsh-history-substring-search [ "$(lsb_release -c -s)" = "orel" ] && ZSH_HISTORY_SEARCH_MULTI_WORD_MODE=1 [ -n "${SSH_CONNECTION}" ] && ZSH_HISTORY_SEARCH_MULTI_WORD_MODE=2 zstyle ':history-search-multi-word' page-size "$((LINES/2))" zstyle ':plugin:history-search-multi-word' clear-on-cancel 'yes' zinit ice \ if'[[ -z ${ZSH_HISTORY_SEARCH_MULTI_WORD_MODE+set} ]]' \ wait'1' lucid light-mode depth'1' \ atload"bindkey '^K' history-search-multi-word" zinit light zdharma-continuum/history-search-multi-word