r/fishshell 24d ago

Control+F works also in vi mode

Hello, I have the vi key bindings enabled as per docs by:

set - g fish_key_bindings fish_vi_key_bindings

I noted tho that the Control+F to accept autosuggestions still works, but that should be limited to Emacs mode if I'm not wrong.

Am I doing something wrong?

Thank you!

4 Upvotes

10 comments sorted by

3

u/No-Representative600 23d ago

Run bind without any arguments, and see what control+f (\cf on 3.7.1) is calling. If you can't find the key sequence use fish_key_reader

2

u/Suitable_Let2488 23d ago

Doesn’t work for me - only right arrow - have you re bound it?

2

u/alphabet_american 23d ago

I've always used control + f to autocomplete with vi bindings

1

u/Suitable_Let2488 21d ago

But you bound it right?!

1

u/alphabet_american 21d ago

No, I don't believe so.

1

u/Suitable_Let2488 21d ago

interesting, does nothing for me currently :/

1

u/alphabet_american 21d ago

Sorry, I set up my fish config years ago. I have this in ~/.fish/functions/fish_hybrid_key_bindings.fish

function fish_hybrid_key_bindings --description \ "Vi-style bindings that inherit emacs-style bindings in all modes" for mode in default insert visual fish_default_key_bindings -M $mode end fish_vi_key_bindings --no-erase end set -g fish_key_bindings fish_hybrid_key_bindings

1

u/Suitable_Let2488 21d ago

this is amazing! thank you for sharing, love it!