当我开始学习和编写自己的 .vimrc 时,我开始使用以下简短的 .vimrc 文件:
1 set number
2
3 highlight GoComment xtermfg=blue
4
5 syntax on
但是,当我尝试获取它时,我得到以下信息:
Error detected while processing /home/matt/.vimrc:
line 3:
E423: Illegal argument: xtermfg=blue
Press ENTER or type command to continue
也:
Command 'highlight' not found, but can be installed with:
sudo apt install highlight
syntax: command not found
有谁知道我做错了什么?请耐心等待,我之前没有制作过自己的 .vimrc 文件
.vimrc
文件的第 3 行可能应该是:highlight GoComment ctermfg=blue
您只能在
term
(普通终端)、cterm
(彩色终端,包括 xterm)和 之间进行选择gui
。至于你的最后一个屏幕转储(“命令'突出显示'未找到...”),它在vim上下文中没有任何意义。看来您试图像执行 shell 脚本一样执行 vimrc 文件。