Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vi key bindings don't work when set in config.fish #1435

Closed
euclio opened this issue Apr 28, 2014 · 3 comments
Closed

Vi key bindings don't work when set in config.fish #1435

euclio opened this issue Apr 28, 2014 · 3 comments

Comments

@euclio
Copy link

euclio commented Apr 28, 2014

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.

@maxfl
Copy link
Contributor

maxfl commented Apr 28, 2014

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

@euclio
Copy link
Author

euclio commented Apr 28, 2014

That'll do it. Thanks for the help!

@euclio euclio closed this as completed Apr 28, 2014
@Hettomei
Copy link

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

despairblue added a commit to despairblue/fish-shell that referenced this issue Apr 8, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants