How to change the color of the selected code (Vim scheme)?

后端 未结 5 828
遇见更好的自我
遇见更好的自我 2021-02-03 22:42

How do I change the color of the selected code in Vim?

There are three selection modes, Visual Line mode or Visual Block mode, and selecting wi

5条回答
  •  暖寄归人
    2021-02-03 23:35

    How to set the color of the selected code in vi?

    I'm using VIM 7.3 on Ubuntu and this does it for me within the editor:

    :syntax on 
    :hi Visual term=reverse cterm=reverse guibg=Grey
    

    I'm using a colorscheme defined in the /home/youruser/.vim/colors/mycolorscheme.vim file. I set the command there and the changes take effect when vim starts.

    syntax on
    hi Visual term=reverse cterm=reverse guibg=Grey
    

提交回复
热议问题