On 27/02/09 18:53, Kenneth Reid Beesley wrote:
>
> In keymap files, you often see pairs of commands like the following:
>
>
> highlight  Cursor guifg=NONE guibg=Green
> highlight lCursor guifg=NONE guibg=Red
>
> The lCursor statement appears to control the color of the cursor when
> the keymap is set/selected (which is rather useful--if you use
> multiple keymaps, the colors can be differentiated to help tell you
> which one is active).
>
> But  :help lCursor   returned no information.
>
> If you type  :help Cursor, you get the example
>
>       if has('multi_byte_ime')
>           highlight Cursor guifg=NONE guibg=Green
>           highlight CursorIM guifg=NONE guibg=Purple
>       endif
>
> with CursorIM.
>
> Could someone please clarify the following:
>
> 1.  What is the effect of the 'highlight Cursor' command?
>
> 2.  Are lCursor and CursorIM equivalent?  If not, what's the difference?
>
> 3.  I've also seen examples with ctermgb set, e.g.   highlight lCursor
> ctermgb=red guibg=red
> What's going on here?
>
> Thanks,
>
> Ken

Highlights Cursor and lCursor are documented under :help 'guicursor'.
Highlight CursorIM is documented under :help CursorIM

- Cursor is the cursor color whenever it is obeying neither lCursor nor 
CursorIM, or when it would, except that they haven't been set.
- lCursor is the GUI cursor color when a keymap is acrive ('iminsert' is 
set to 1). IIUC, it cannot be used in non-Dos/Windows Console mode, 
because in that case 'guicursor' is not used, t_SI and t_EI are used 
instead, and they make no provision for using keymaps.
- CursorIM is the cursor color when an Input Method (XIM or IME) is 
active ('iminsert' is set to 2).

Like all highlight groups, all three settings are global: if you are 
using different keymaps in different split-windows, and each of them 
sets lCursor to a different value, the last one set wins out and applies 
to _all_ keymaps you might be using in parallel ('keymap' and 'iminsert' 
are buffer-local options).


Best regards,
Tony.
-- 
Certainly there are things in life that money can't buy, but it's very 
funny--
        Did you ever try buying them without money?
                -- Ogden Nash

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

Reply via email to