1

So I have set -o vi set in my .bashrc file

When I open terminal it starts in INSERT mode. How can I make it so that it starts in NORMAL mode?

2
  • 3
    I’m voting to close this question because it's about bash, and not vi. Questions about the shell's vi mode are off-topic and a better fit on unix.stackexchange.com (it seems it's already answered there, as the previous comment says). Jun 5, 2022 at 11:16

1 Answer 1

0

Bash's vi mode, which you're referring to, only emulates a few vim concepts, and there's technically no vi or vim involved there. The vi stuff bash provides can not be configured the way vim can, (again, it only emulates vim, and a small part of vim at that).

While I don't think what you want is possible with the shell's vi-mode... there is a program you can install which brings greater vim power into the shell: https://github.com/ardagnir/athame.

Athame patches your shell to add full Vim support by routing your keystrokes through an actual Vim process.

Athame allows you to configure the vi-mode your shell starts in. https://github.com/ardagnir/athame#why-does-athame-start-in-insertnormal-mode describes insert mode is default but it provides a configuration setting so that normal mode can be default.

Not the answer you're looking for? Browse other questions tagged or ask your own question.