diff options
Diffstat (limited to 'share/functions/fish_vi_key_bindings.fish')
-rw-r--r-- | share/functions/fish_vi_key_bindings.fish | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/share/functions/fish_vi_key_bindings.fish b/share/functions/fish_vi_key_bindings.fish index edff29f8..b6b7494e 100644 --- a/share/functions/fish_vi_key_bindings.fish +++ b/share/functions/fish_vi_key_bindings.fish @@ -5,7 +5,6 @@ function fish_vi_key_bindings --description 'vi-like key bindings for fish' set fish_key_bindings fish_vi_key_bindings # This triggers the handler, which calls us again and ensures the user_key_bindings are executed return end - # The default escape timeout is 300ms. But for users of Vi bindings that can be slightly # annoying when trying to switch to Vi "normal" mode. So set a shorter timeout in this case # unless the user has explicitly set the delay. @@ -27,22 +26,20 @@ function fish_vi_key_bindings --description 'vi-like key bindings for fish' # Remove the default self-insert bindings in default mode bind -e "" -M default # Add way to kill current command line while in insert mode. - bind -M insert \cc 'commandline ""' + bind -M insert \cc __fish_cancel_commandline # Add a way to switch from insert to normal (command) mode. bind -M insert -m default \e backward-char force-repaint - # - # normal (command) mode - # + # Default (command) mode bind :q exit bind \cd exit - bind \cc 'commandline ""' + bind -m insert \cc __fish_cancel_commandline bind h backward-char bind l forward-char bind \e\[C forward-char bind \e\[D backward-char - # Some linux VTs output these (why?) + # Some terminals output these when they're in in keypad mode. bind \eOC forward-char bind \eOD backward-char |