Vi supremacy in the Shell

For those of you who haven't set opencode as your default shell

Bash has an inbuilt vi mode that lets you use vi-styled keybinds instead of the usual emacs-styled ones.

You can enable it by adding this one line to your ~/.bashrc:

set -o vi

However, this doesn't tell you which mode you are in currently, so adding this line will give you text indicators:

set show-mode-in-prompt on

demo:

image

0 comments

reply on GitHub