I'm one of the "cursed ones" that got their start in vi
instead of emacs
so the shell editing commands I am used to are set in bash with set -o vi
but this doesn't work in the fish shell.
How can I enable vi
/ vim
style key commands in the friendly interactive shell that runs when you install fish
from https://brew.sh?
Best Answer
There is a command in
fish
to enable this one time and that command is:To set this at every start up for all instances of the shell, create a startup file if it doesn't exist (or touch the date in case it exists) and then add that command to the startup file.
This is well documented on Stack Overflow as well, but I figured a clear answer here would help some people find the setup sooner. https://stackoverflow.com/questions/28444740/how-to-use-vi-mode-in-fish-shell