You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously I tried defining fish_user_key_bindings but that didn't have any effect:
-> cat ~/.config/fish/functions/fish_user_key_bindings.fish
function fish_user_key_bindings
bind -M insert -m default kj backward-char force-repaint
end
It seems that maybe the fish_user_key_bindings function is not called after setting up vi key bindings? I grepped the code to figure out where that might be but didn't find any invocations that seemed relevant. Only the one in __fish_reload_key_bindings.
Reacted by Andy Klimczak, swsnr, Christian Rondeau, Maximilian MM and Valentin Berlin
I had the same problem! i found these #1495 from @kballard
We can't run fish_user_key_bindings for all modes, because every single existing usage of fish_user_key_bindings is written for default mode, and running it under vi mode will almost certainly cause unexpected bindings to be set.
I think we should run it in all modes. Presumably a user wants to use either vi key bindings or normal, not both. If they do want to use both they can check for $__fish_vi_mode.
I agree - fish_user_key_bindings is, as the name implies, written by the user - if they want to have vi-mode, they'll write them so they work with vi-mode.
Activity
konchalas commentedon Jul 31, 2015
I had the same problem! i found these #1495 from @kballard
ridiculousfish commentedon Jul 31, 2015
I think we should run it in all modes. Presumably a user wants to use either vi key bindings or normal, not both. If they do want to use both they can check for
$__fish_vi_mode.faho commentedon Aug 14, 2015
I agree -
fish_user_key_bindingsis, as the name implies, written by the user - if they want to have vi-mode, they'll write them so they work with vi-mode.faho commentedon Aug 17, 2015
@kballard: What are your thoughts on this?
Load fish_user_key_bindings for any binding (including vi)