Рефакторинг

This commit is contained in:
2022-12-23 11:39:49 +03:00
parent 01f900a450
commit 020da06b8a
8 changed files with 55 additions and 69 deletions

View File

@@ -37,32 +37,3 @@ zinit wait'0' lucid light-mode depth'1' for \
atload"!_zsh_autosuggest_start" \
zsh-users/zsh-autosuggestions
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'
if [[ -z ${ZSH_HISTORY_SEARCH_MULTI_WORD_MODE+set} ]]; then
zinit wait'1' lucid light-mode depth'1' for \
atload"bindkey '^K' history-search-multi-word" \
zdharma-continuum/history-search-multi-word
#else
# function magic-ctrl-k {
# if ! (( $#BUFFER )) && [[ "$CONTEXT" == start ]]; then znt-history-widget; fi
# }
# zle -N magic-ctrl-k
# bindkey '^K' magic-ctrl-k
#elif [ ${ZSH_HISTORY_SEARCH_MULTI_WORD_MODE} = "1" ]; then
# zinit wait'2' lucid light-mode depth'1' for \
# atload"bindkey '^K' history-search-multi-word" \
# zdharma-continuum/history-search-multi-word
#elif [ ${ZSH_HISTORY_SEARCH_MULTI_WORD_MODE} = "2" ]; then
# zinit light zdharma-continuum/history-search-multi-word
# bindkey '^K' history-search-multi-word
fi