mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-14 14:03:58 +00:00
Vi bindings: Control-N to accept autosuggestion
One of the things that keep me from using Vi mode is that it doesn't define an insert-mode shortcut to accept autosuggestions. Let's use Control-N because that Vim key is the closest equivalent. Closes #10339
This commit is contained in:
parent
b3c610feff
commit
836ee93617
1 changed files with 2 additions and 0 deletions
|
@ -104,6 +104,8 @@ 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-single-char forward-word backward-char
|
||||||
bind -s --preset E forward-single-char forward-bigword backward-char
|
bind -s --preset E forward-single-char forward-bigword backward-char
|
||||||
|
|
||||||
|
bind -s --preset -M insert \cn accept-autosuggestion
|
||||||
|
|
||||||
# Vi/Vim doesn't support these keys in insert mode but that seems silly so we do so anyway.
|
# 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
|
bind -s --preset -M insert -k home beginning-of-line
|
||||||
bind -s --preset -M default -k home beginning-of-line
|
bind -s --preset -M default -k home beginning-of-line
|
||||||
|
|
Loading…
Reference in a new issue