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:
Johannes Altmanninger 2024-03-02 10:53:12 +01:00
parent b3c610feff
commit 836ee93617

View file

@ -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-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.
bind -s --preset -M insert -k home beginning-of-line
bind -s --preset -M default -k home beginning-of-line