Move the alt+left/right binding into zsh integration

It works OOTB in bash and fish already.
This commit is contained in:
Kovid Goyal
2022-12-19 11:23:31 +05:30
parent e3f6f47f10
commit e4ee2cf995
4 changed files with 6 additions and 11 deletions

View File

@@ -388,6 +388,11 @@ _ksi_deferred_init() {
alias edit-in-kitty="kitty-tool edit-in-kitty"
# Map alt+left/right to move by word if not already mapped. This is expected behavior on macOS and I am tired
# of answering questions about it.
[[ $(builtin bindkey "^[1;3C") == *" undefined-key" ]] && builtin bindkey "^[1;3C" "forward-word"
[[ $(builtin bindkey "^[1;3D") == *" undefined-key" ]] && builtin bindkey "^[1;3D" "backward-word"
# Unfunction _ksi_deferred_init to save memory. Don't unfunction
# kitty-integration though because decent public functions aren't supposed to
# to unfunction themselves when invoked. Unfunctioning is done by calling code.