vimrc make comments italic

前端 未结 5 1504
说谎
说谎 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:45

    michaelmichael's answer should solve it for most cases. But, just in case you need this for a font in gvim that doesn't have italics (but oblique or something instead), you can try something like this in ~/.gvimrc

    highlight Comment font=Bitstream_Vera_Sans_Mono_Oblique:h14
    

    where h14 is the font size. This font should have the same cell size as your normal font though, so don't use an altogether different font.

提交回复
热议问题