2023-09-15 22:59:26 +02:00
|
|
|
typeset -g -A key
|
|
|
|
|
|
|
|
key[Home]="${terminfo[khome]}"
|
|
|
|
key[End]="${terminfo[kend]}"
|
|
|
|
|
|
|
|
[[ -n "${key[Home]}" ]] && bindkey -- "${key[Home]}" beginning-of-line
|
|
|
|
[[ -n "${key[End]}" ]] && bindkey -- "${key[End]}" end-of-line
|
|
|
|
|
|
|
|
if (( ${+terminfo[smkx]} && ${+terminfo[rmkx]} )); then
|
|
|
|
autoload -Uz add-zle-hook-widget
|
|
|
|
function zle_application_mode_start { echoti smkx }
|
|
|
|
function zle_application_mode_stop { echoti rmkx }
|
|
|
|
add-zle-hook-widget -Uz zle-line-init zle_application_mode_start
|
|
|
|
add-zle-hook-widget -Uz zle-line-finish zle_application_mode_stop
|
|
|
|
fi
|
|
|
|
|
|
|
|
## keybinding for convenient viewing of man pages
|
|
|
|
if test -x "${HOME}/bin/split-man"; then
|
|
|
|
split-man-widget() { "${HOME}/bin/split-man"}
|
|
|
|
zle -N split-man-widget
|
|
|
|
|
|
|
|
bindkey '^[m' split-man-widget
|
|
|
|
fi
|
|
|
|
|
|
|
|
## gumssh
|
|
|
|
if test -x "$(command -v gumssh)"; then
|
|
|
|
bindkey -s '^[s' 'gumssh^M'
|
|
|
|
fi
|
|
|
|
|
2024-10-26 20:30:45 +02:00
|
|
|
## yazi
|
|
|
|
if test -x "$(command -v yazi)"; then
|
|
|
|
bindkey -s '^[f' 'yazi^M'
|
2023-09-15 22:59:26 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
## history substring search
|
|
|
|
bindkey '^[[1;5A' history-substring-search-up
|
|
|
|
bindkey '^[[1;5B' history-substring-search-down
|