Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to automatically invert the cursor color or current line color color in gvim

In my current gvim, the cursor color is fixed. But I need to change the color automatically.

Is it possible to automatically invert the cursor color or current line color in gvim?

like image 657
imbichie Avatar asked Dec 30 '13 11:12

imbichie


1 Answers

Yes it is.

:hi Cursor gui=reverse guibg=NONE guifg=NONE
:hi CursorLine gui=reverse

If you use a specific colorscheme, find the corresponding line and change it as above.

If you don't, append one of the lines above (without the :) to your ~/.vimrc.

--- EDIT ---

I wrote this comprehensive gist in the meantime.

like image 124
romainl Avatar answered Oct 06 '22 14:10

romainl