over Windows terminal change cursor width or color in Vim depending on mode
Posted
by
INTPnerd
on Super User
See other posts from Super User
or by INTPnerd
Published on 2011-06-30T05:37:39Z
Indexed on
2011/06/30
16:25 UTC
Read the original article
Hit count: 418
I am using PuTTY to connect over SSH to an Ubuntu server from my Windows 7 workstation. Once connected I am using the Vim installation from the Ubuntu server to edit files. I want the cursor to change when I go into and out of insert mode. Part of my .vimrc file is like this but it is not changing the cursor:
if &term =~ "xterm"
echo "xTerm!!inate!"
let &t_SI = "\<Esc>]12;purple\x7"
let &t_EI = "\<Esc>]12;blue\x7"
endif
I know that the if statement is executing because of the echo.
EDIT: Actually I would prefer to change the cursor to be a vertical line like you can in the PuTTY settings rather than change the color, or maybe even do both. But just changing the color would be a lot better than nothing. Also I am willing to change terminals if there is another Windows 7 Professionsal 64 bit compatible terminal that can do this (preferably something free). Maybe Poderosa can do this?
© Super User or respective owner