Search code examples
shellvifish

Bind a key to accept the first suggested word function in Fish


I use the vi keybinding mode in Fish. Alt+Right works but I need to move my hand away from hjkl.

Is it possible to bind a key like Alt+l to accept the first suggest word?

Thank you.


Solution

  • Yes, the binding is nextd-or-forward-word. So you could write:

    bind \el nextd-or-forward-word
    

    \el is probably alt-L on your system as well, but you can double check by running fish-key_reader.