home: zsh: add ctrl-delete mapping

This commit is contained in:
Bruno BELANYI 2023-03-15 17:39:13 +00:00
parent 69fbc438c1
commit 4f0a619921

View file

@ -43,6 +43,17 @@ else
bindkey -M vicmd "^[3;5~" delete-char bindkey -M vicmd "^[3;5~" delete-char
fi fi
# Ctrl-Delete to delete a whole word forward
if [ -n "${terminfo[kdl1]}" ]; then
bindkey -M emacs "${terminfo[kdl1]}" kill-word
bindkey -M viins "${terminfo[kdl1]}" kill-word
bindkey -M vicmd "${terminfo[kdl1]}" kill-word
else
bindkey -M emacs '^[[3;5~' kill-word
bindkey -M viins '^[[3;5~' kill-word
bindkey -M vicmd '^[[3;5~' kill-word
fi
# Enable Shift-Tab to go backwards in completion list # Enable Shift-Tab to go backwards in completion list
if [ -n "${terminfo[kcbt]}" ]; then if [ -n "${terminfo[kcbt]}" ]; then
bindkey -M emacs "${terminfo[kcbt]}" reverse-menu-complete bindkey -M emacs "${terminfo[kcbt]}" reverse-menu-complete