mirror of
https://codeberg.org/hyperreal/dotfiles
synced 2024-11-25 11:53:43 +01:00
33 lines
977 B
Bash
33 lines
977 B
Bash
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 "${HOME}/bin/gumssh"; then
|
|
bindkey -s '^[s' 'gumssh^M'
|
|
fi
|
|
|
|
## history substring search
|
|
bindkey '^[[1;5A' history-substring-search-up
|
|
bindkey '^[[1;5B' history-substring-search-down
|