Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VIM: Change cursor to underscore in normal mode

Tags:

vim

One nice feature of Sublime Text's Vintage Mode is that entering normal mode makes an underscore under the character you are one, rather than the standard cursor that highlights the current character with a certain background color.

Is there a way in GUI VIM to change the normal mode cursor to an underscore under the current character you're on like Sublime Text?

Thanks!

like image 209
beakr Avatar asked Apr 22 '13 17:04

beakr


2 Answers

Yes, there is. Take a look in :h guicursor. Here's my suggestion, trying to keep it as close as the default configuration for the syntax group.

:set guicursor+=n:hor20-Cursor/lCursor
like image 121
sidyll Avatar answered Oct 04 '22 00:10

sidyll


Option 'guicursor' controls how cursor is displayed.

I've never seen Sublime Text, but line below changes the cursor to underscore on normal mode:

 set guicursor=n-ci:hor30-iCursor-blinkwait300-blinkon200-blinkoff150

See :h guicursor for details on how you can change the cursor.

like image 28
mMontu Avatar answered Oct 04 '22 00:10

mMontu