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

StackOverflow https://stackoverflow.com/questions/20838274

  •  22-09-2022
  •  | 
  •  

문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top