On 06/02/09 17:22, Garrett Whelan wrote:
> Under Ubuntu, when I go into insert mode with gVim the curser changes to
> a vertical line while regular mode it's a square. I'd like the same
> behavior in terminal Vim.
>
> Does anyone know how to set that up?

The cursor shape changes according to three separate mechanisms:
- in all GUI versions (running in GUI mode), many shapes are possible, 
varying either the height or the width depending on the 'guicursor' option.
- In Windows Console version, the height can vary but the width cannot; 
the 'guicursor' option is used for that too.
- In non-Windows versions of Vim running in Console mode, the cursor is 
handled by the terminal. Vim can change the cursor between Normal and 
Insert mode provided that the terminal supports it and that the 
+cursorshape feature is compiled-in (an underscore or a different color 
might be possible; a vertical bar is doubtful). You have to find out 
which codes your terminal needs to change the cursor, and assign them to 
the non-standard termcap codes t_SI (start-insert) and t_EI 
(end-insert). If one or both of them is empty there will be no cursor 
change. The values will probably depend on the particular terminal 
you're running in, so you'll probably have to test the 'term' option 
value when setting those codes.

See:
        :help 'guicursor'
                for GUI and for DOS/Windows console
        :help termcap-cursor-shape
                for non-Windows (-non-DOS) console.
        :echo has('cursorshape')
                to see if the necessary feature is compiled-in
                1=yes, 0=no

Best regards,
Tony.
-- 
LAUNCELOT: Isn't there a St. Aaaaarrrrrrggghhh's in Cornwall?
ARTHUR:    No, that's Saint Ives.
                  "Monty Python and the Holy Grail" PYTHON (MONTY) 
PICTURES LTD

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

Reply via email to