Remove old OS X stuff from keybindings

We don't support older than 10.10 anymore.

fish_key_reader reports the hardcoded bind we had for Mavericks
is just -k sdc.
This commit is contained in:
Aaron Gyes 2021-10-06 19:24:36 -07:00
parent 6fde56ff2d
commit 7122209f25
2 changed files with 7 additions and 8 deletions

View file

@ -69,7 +69,7 @@ function fish_default_key_bindings -d "Default (Emacs-like) key bindings for fis
bind --preset $argv -k home beginning-of-line
bind --preset $argv -k end end-of-line
bind --preset $argv \e\[3\;2~ backward-delete-char # Mavericks Terminal.app shift-ctrl-delete
bind --preset $argv -k sdc backward-delete-char # shifted delete
bind --preset $argv \ca beginning-of-line
bind --preset $argv \ce end-of-line

View file

@ -118,12 +118,11 @@ function fish_vi_key_bindings --description 'vi-like key bindings for fish'
bind -s --preset e forward-single-char forward-word backward-char
bind -s --preset E forward-bigword backward-char
# OS X SnowLeopard doesn't have these keys. Don't show an annoying error message.
# Vi/Vim doesn't support these keys in insert mode but that seems silly so we do so anyway.
bind -s --preset -M insert -k home beginning-of-line 2>/dev/null
bind -s --preset -M default -k home beginning-of-line 2>/dev/null
bind -s --preset -M insert -k end end-of-line 2>/dev/null
bind -s --preset -M default -k end end-of-line 2>/dev/null
bind -s --preset -M insert -k home beginning-of-line
bind -s --preset -M default -k home beginning-of-line
bind -s --preset -M insert -k end end-of-line
bind -s --preset -M default -k end end-of-line
# Vi moves the cursor back if, after deleting, it is at EOL.
# To emulate that, move forward, then backward, which will be a NOP
@ -140,8 +139,8 @@ function fish_vi_key_bindings --description 'vi-like key bindings for fish'
bind -s --preset -M default \ch backward-char
bind -s --preset -M insert \x7f backward-delete-char
bind -s --preset -M default \x7f backward-char
bind -s --preset -M insert \e\[3\;2~ backward-delete-char # Mavericks Terminal.app shift-ctrl-delete
bind -s --preset -M default \e\[3\;2~ backward-delete-char # Mavericks Terminal.app shift-ctrl-delete
bind -s --preset -M insert -k sdc backward-delete-char # shifted delete
bind -s --preset -M default -k sdc backward-delete-char # shifted delete
bind -s --preset dd kill-whole-line
bind -s --preset D kill-line