Reputation:
I currently use MacVim for a lot of my editor needs but occasionally I need to edit files remotely over SSH. In MacVim the shape of the cursor varies depending on your current mode, i.e.
command mode -> block cursor
and insert mode -> vertical bar cursor
,
which I find very helpful.
Is there a way to replicate this behavior in a .vimrc
file, so that it can be used remotely?
Upvotes: 13
Views: 4292
Reputation: 181
Try :help termcap-cursor-shape
. There are two options there you can set:
&t_SI
- Shape when you enter insert mode.&t_EI
- Shape when you exit insert mode.In order for this to work, the Vim you are using must have been compiled with +cursorshape
feature.
I personally always use gvim, so this was never a problem :)
. Hope this helps.
Upvotes: 9