如何像在gedit中一样向vim添加语法突出显示?


Answers:


10

vim广泛支持语法突出显示,典型的发行版包含许多突出显示规则。要启用此功能,您必须:syntax on在vim会话中或全局.vimrc文件中启用语法模块。

有关语法,请参见vim帮助


8

尝试:syntax on

要默认启用语法高亮显示,请将以下行添加到您的~/.vimrc

syntax on

如果文件不存在,请创建它。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.