Joh*_*ofy 5 vim file-type makefile syntax-highlighting gnu-make
最近,我用vim文本编辑器编写了一个没有文件扩展名的文本文件,并用高亮显示了单行引号(如)'word'和以冒号(如)结尾的所有单词。word:
我喜欢这种突出显示。
但是因为我没有键入任何通常以开头的命令,所以ESC :command我很惊讶这是怎么发生的。
是否有命令显示正在使用的实际语法突出显示?
我已经尝试过:set syntax=php似乎只用不同颜色的命令类似的命令word:
有人有建议吗?
set option=value "set the option with value
set option? "read/print the current value of the option
set option! "set the option with opposite value, like set nu and set nu!
Run Code Online (Sandbox Code Playgroud)
选项值也保存在变量中,&option因此您可以以脚本方式读取。