vimrc make comments italic

前端 未结 5 1562
说谎
说谎 2021-02-01 14:08

How do I change the ~/.vimrc to have the comments in my code italicized?

In my ~/.vimrc file I have:

highlight Comment ctermfg=         


        
5条回答
  •  耶瑟儿~
    2021-02-01 14:42

    highlight Comment cterm=italic gui=italic
    

    You'll need a font with an italic set and a terminal capable of displaying italics. Also, if you're using a color scheme other than the default, the above line should come after the color scheme is loaded in your ~/.vimrc so that the color scheme doesn't override it.

    The cterm makes it work in the terminal and the gui is for graphical Vim clients.

提交回复
热议问题