2022-07-17 04:25:55 +02:00
|
|
|
typeset -g -A key
|
2022-08-12 14:52:48 +02:00
|
|
|
|
2022-07-17 04:25:55 +02:00
|
|
|
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
|
|
|
|
|
2022-08-12 14:52:48 +02:00
|
|
|
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
|
|
|
|
|
2022-11-24 07:10:34 +01:00
|
|
|
## check if fzf keybindings file exists
|
|
|
|
if test -f /home/jas/.fzf/shell/key-bindings.zsh; then
|
|
|
|
source /home/jas/.fzf/shell/key-bindings.zsh
|
|
|
|
|
|
|
|
page-up-within-tmux() {
|
|
|
|
if (( ${+TMUX} )); then
|
|
|
|
tmux copy-mode -u
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
zle -N page-up-within-tmux
|
|
|
|
|
|
|
|
# page up
|
|
|
|
bindkey "${terminfo[kpp]}" page-up-within-tmux
|
|
|
|
fi
|
|
|
|
|
|
|
|
## keybinding for convenient viewing of man pages
|
|
|
|
if test -x "${HOME}/bin/tman"; then
|
|
|
|
tman-widget() { "${HOME}/bin/tman"}
|
|
|
|
zle -N tman-widget
|
|
|
|
|
|
|
|
bindkey '^[m' tman-widget
|
|
|
|
fi
|
|
|
|
|
2022-07-17 04:25:55 +02:00
|
|
|
## history substring search
|
|
|
|
bindkey '^[[1;5A' history-substring-search-up
|
|
|
|
bindkey '^[[1;5B' history-substring-search-down
|