- enable VI mode
fish_vi_key_bindings
- restore the word navigation keys I'm used to in insert mode
cat << EOF > ~/.config/fish/functions/fish_user_key_bindings.fish function fish_user_key_bindings bind -M insert \e\[1\;5C nextd-or-forward-word # ctrl-right bind -M insert \e\[1\;5D prevd-or-backward-word # ctrl-left bind -M insert \cK kill-line # bring back emacs style <C-k> in insert mode end EOF
Thanks to https://superuser.com/a/1092277/384058 for how to get the keys to be bound on terminal startup.
Thanks to https://unix.stackexchange.com/a/76591/68885 for some useful tips on finding keycodes.
fish_key_reader
is a useful tool to figure out a key sequence.
You can use
sed -n l
...to dump the escape codes when you press keys.