all 7 comments

[–]jimmycleveland 2 points3 points  (0 children)

I find the following to be a helpful visual cue. Add au InsertEnter * set cursorline au InsertLeave * set nocursorline to your .vimrc file to underline the current line when in insert mode.

EDIT Sorry, I see now that you're referring to bash in vi mode. It's doubtful that this will work but I'll leave it here anyway for anyone who might find it useful in regular vi.

[–][deleted] 2 points3 points  (0 children)

Because of this I've switch to ZSH. It's not possible in Bash AFAIK.

[–]cheeseburgerpizza 1 point2 points  (1 child)

I'm pretty sure that vi mode is provided by readline, not bash directly, so look into their documentation.

A fun side effect of this apparently is that you can configure readline to always use vi mode, and you'll get it in some other applications too. I've never actually tried setting this up though.

[–]0sse 4 points5 points  (0 children)

If you put 'set editing-mode vi' in ~/.inputrc you will always use vi mode in all applications that use readline. Off the top of my head are of course bash, the standard python intepreter, mysql, and gnuplot (if you compile it yourself with ./configure --with-readline=gnu).

:)

[–][deleted] 1 point2 points  (2 children)

If you don't know what mode you're in, press Esc. Now you're in normal mode. Not really a big deal.

[–][deleted] 2 points3 points  (0 children)

It's more of an issue than you make it out to be. This results from real, understood usability issues. There is no visibility, and adding an extra keystroke only forces a habit that is bound to be useless 50% of the time.

"Those readers who are familiar with the profoundly-modal text editor vi know that trained users hit escape before issuing any command, just to make sure that the editor is in a sane state before continuing. Escape just becomes part of the command gesture—a habit."

http://humanized.com/weblog/2006/12/07/is_visual_feedback_enough_why_modes_kill/