You are not logged in.
Pages: 1
When we press insert or i in gvim the cursor shape changes from a fat block to thin and back to fat state when esc is pressed. But I also want this behavior in vim, is it possible to set that in vim. I am using sakura as terminal.
Offline
I don't think so. gVim can do that because it's applying a UI to vim, but since regular vim is a CLI app it's limited to what terminals can display.
Offline
I think this has been discussed here before and I don't think anyone came up with a solution unfortunately.
archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson
Offline
Have a look at the t_EI and t_SI options.
I have these lines in my .vimrc for changing the cursor color depending on the mode
if &term =~ "rxvt-unicode"
"Set the cursor white in cmd-mode and orange in insert mode
let &t_EI = "\<Esc>]12;white\x9c"
let &t_SI = "\<Esc>]12;orange\x9c"
"We normally start in cmd-mode
silent !echo -e "\e]12;white\x9c"
endif
The escape codes are terminal dependent, I use urxvt. Have a look at the documentation of sakura if it allows to change the cursor shape.
Edit: Corrected the test from general rxvt to rxvt-unicode (also in my .vimrc! :-))
Last edited by davvil (2008-12-05 17:08:05)
Offline
I think most terminals set their cursor once at the beginning and don't ever re-check the configuration file. The only thing that comes to mind to solve this problem would be to rewrite the configuration file every time you hit i and then somehow force your terminal to re-load the configuration file.
[ lamy + pilot ] [ arch64 | wmii ] [ ati + amd ]
Offline
Thanks for the help guys.
Offline
Pages: 1