2009/2/11 Tintin72 wrote:

> Hi,
>
> In Vim under Windows, when I shift in insert mode, cursor turn to an
> underscore _.
> It's very handy cause I alway know wich mode I'm in.
> Unfortunately when I run VIm under Linux (Ubuntu), cursor
> remain the same (square) in command or insert mode and it's confused
> me.
>
> Is there any way to change the shape of the cursor when shifting in
> insert mode ?
>
>
> Thanks.

If you use gvim, the shape of the cursor should change when
switching to insert mode.  See ":help guicursor" for how you can
also customize this default behavior further.

If you use Vim in a terminal, you can't change the shape of the
cursor. However, you can change the color of the cursor.  It works
at least in xterm & rxvt but unfortunately does not work in
gnome-terminal, Kconsole and xfce4-terminal).   To do this,
just add the following lines in your ~/.vimrc:

if &term =~ "xterm\\|rxvt"
  :silent !echo -ne "\033]12;red\007"
  let &t_SI = "\033]12;orange\007"
  let &t_EI = "\033]12;red\007"
  autocmd VimLeave * :!echo -ne "\033]12;red\007"
endif

It will change the color of the cursor to red in command mode,
and orange in insert mode. See also ":help t_SI".

Cheers
-- Dominique

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to