Fish-shell: Vi key bindings don't work when set in config.fish

Created on 28 Apr 2014  ·  3Comments  ·  Source: fish-shell/fish-shell

Steps to reproduce:

  1. Add the line fish_vi_key_bindings to ~/.config/fish/config.fish.
  2. Open fish. The shell won't respond to any keys (including i, a, etc.), so I can't type anything into the prompt.

The key bindings work as expected when I open the shell without this line in my config, and instead call fish_vi_key_bindings in the shell.

Most helpful comment

I think this should definitely be in the FAQ.

I have to come in this issue to found in http://fishshell.com/docs/current/commands.html#bind

Key bindings are not saved between sessions by default. To save custom keybindings, edit the fish_user_key_bindings function and insert the appropriate bind statements.

A helpfull FAQ would be :

How to start with vi mode ?

edit $HOME/.config/fish/functions/fish_user_key_bindings.fish

function fish_user_key_bindings
  fish_vi_key_bindings
end

All 3 comments

Try putting fish_vi_key_bindings to the 'fish_user_key_bindings' function instead of config.fish

That'll do it. Thanks for the help!

I think this should definitely be in the FAQ.

I have to come in this issue to found in http://fishshell.com/docs/current/commands.html#bind

Key bindings are not saved between sessions by default. To save custom keybindings, edit the fish_user_key_bindings function and insert the appropriate bind statements.

A helpfull FAQ would be :

How to start with vi mode ?

edit $HOME/.config/fish/functions/fish_user_key_bindings.fish

function fish_user_key_bindings
  fish_vi_key_bindings
end
Was this page helpful?
0 / 5 - 0 ratings

Related issues

gawells picture gawells  ·  3Comments

luc-j-bourhis picture luc-j-bourhis  ·  3Comments

andrewhowdencom picture andrewhowdencom  ·  3Comments

krader1961 picture krader1961  ·  3Comments

pawlosck picture pawlosck  ·  3Comments