.vimrc file not working
I have the following short and simple .vimrc file that I’ve started as I begin to learn and write my own .vimrc:
1 set number
2
3 highlight GoComment xtermfg=blue
4
5 syntax on
However, when I try to source it, I get the following:
Error detected while processing /home/matt/.vimrc:
line 3:
E423: Illegal argument: xtermfg=blue
Press ENTER or type command to continue
as well as:
Command 'highlight' not found, but can be installed with:
sudo apt install highlight
syntax: command not found
does anyone know what I’m doing wrong? Bear with me, I haven’t made my own .vimrc file before
Line 3 of your .vimrc
file should probably be:
highlight GoComment ctermfg=blue
You can only choose between term
(normal terminal), cterm
(color terminal, including xterm) and gui
.
As for your last screen dump (« Command ‘highlight’ not found … »), it makes no sense in a vim context. It appears you tried to execute your vimrc file as if it was a shell script.