Search code examples
vimcolor-scheme

How I can change cursor color in Vim's color scheme?


I use this color scheme: Cobalt Colour scheme.

I cannot see the cursor in insert mode.

How I can change the cursor's color?

I think this is the cursor part:

hi CursorLine     guifg=none              guibg=#002943
hi Cursor         guifg=#F8F8F8           guibg=#A7A7A7
hi CursorIM       guifg=#F8F8F8           guibg=#002947"#5F5A60

Solution

  • There is quite a lot of information about how to set the insert mode cursor color in the vim documentation

    Here is an example from the linked documentation:

    highlight Cursor guifg=white guibg=black
    highlight iCursor guifg=white guibg=steelblue
    set guicursor=n-v-c:block-Cursor
    set guicursor+=i:ver100-iCursor
    set guicursor+=n-v-c:blinkon0
    set guicursor+=i:blinkwait10
    

    EDIT:

    The i means insert mode, v visual, c command, and n normal