vimrc用斜体发表评论 [英] vimrc make comments italic

查看:101
本文介绍了vimrc用斜体发表评论的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何更改~/.vimrc以使代码中的注释变为斜体?

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

在我的~/.vimrc文件中,我有:

highlight Comment ctermfg=blue

使注释变为蓝色.我需要做些什么来使其变为斜体?

that makes the comments blue. What do I need to do differently to make them italic?

推荐答案

highlight Comment cterm=italic gui=italic

您需要一个带有斜体集的字体和一个能够显示斜体的终端.另外,如果您使用的颜色方案不是默认方案,则上一行应在将颜色方案加载到~/.vimrc中之后出现,以便颜色方案不会覆盖它.

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.

cterm使其可以在终端中运行,而gui用于图形Vim客户端.

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

这篇关于vimrc用斜体发表评论的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆