diff options
author | Kurtis Rader <krader@skepticism.us> | 2016-04-13 19:46:18 -0700 |
---|---|---|
committer | Kurtis Rader <krader@skepticism.us> | 2016-04-14 20:57:04 -0700 |
commit | 5f849d02646b60943557b00b51a0e592c2387959 (patch) | |
tree | 872baacf4db97456bb596ce19be61fefcc9549c1 /share/functions/fish_vi_key_bindings.fish | |
parent | 671c0515d4212f3cf37eccc080527c42eec7d060 (diff) |
provide a better experience when user presses \cC
Fixes #2904
Diffstat (limited to 'share/functions/fish_vi_key_bindings.fish')
-rw-r--r-- | share/functions/fish_vi_key_bindings.fish | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/share/functions/fish_vi_key_bindings.fish b/share/functions/fish_vi_key_bindings.fish index f6395667..b1fc2659 100644 --- a/share/functions/fish_vi_key_bindings.fish +++ b/share/functions/fish_vi_key_bindings.fish @@ -22,22 +22,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 |