views:

553

answers:

1

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, 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?

Thanks.

+2  A: 

Try ":help term-cursor-shape". There are two options there you can set - &t_SI (shape when you enter insert mode) and &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.

krshrk
Unfortunately gVim isn't installed on the server I'm accessing. I did a little searching and it looks like the cursor shape can't be changed in regular Vim. Oh well.