Is it possible to automatically invert the color of the cursor or the color of the current line 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 the current line color in gvim.

+4
source share
1 answer

Yes it is.

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

If you are using a specific color scheme, find the appropriate line and change it as described above.

If you do not, add one of the lines above (without :) to yours ~/.vimrc.

+7
source

All Articles