Since these key bindings are already defined in fish_default_key_bindings, I assume that the problem is with your terminal emulator and that it does not send the correct escape sequence.
You also do not have to edit the global configuration of /usr/share/fish/config.fish . Your custom configuration is in ~/.config/fish/config.fish
If you want to specify your own key bindings, this must be done inside the fish_user_key_bindings function.
You can do this manually by editing: ~/.config/fish/functions/fish_user_key_bindings.fish .
Or use the provided tools:
If the function does not exist, you can do:
function fish_user_key_bindings bind \e\[1\;5C forward-word bind \e\[1\;5D backward-word end funcsave fish_user_key_bindings
Or, if you already have a function:
funced fish_user_key_bindings funcsave fish_user_key_bindings
Edit:
The reason you cannot specify them in your configuration is because they are below reset, here in fish_default_key_bindings .
terje source share