This one beats me after 30 years of vi/vim usage... Context: I'm on FreeBSD using the latest vim (7.4.796). A month or so ago, syntax highlighting in xterm(318) started acting up. In particular, the highlighting of comments is cyan, not the expected gray.
To track this down I have done the following.
Strip down my
~/.vimrc to these few lines
$ vim .vimrc 1 " Normal must be set before colors "fg" and "bg" can be used. 2 highlight Normal ctermfg=216 ctermbg=233 3 4 " gray This comment. 5 highlight Comment cterm=NONE ctermfg=250 ctermbg=bg 6 7 " Line numbers indicate this .vimrc was read. 8 set number 9 syntax enable
Note that the line numbers appear; color 250 is gray in my
I have moved away my
~/.vim directory to avoid any local plugin interference.
Interestingly, when I
:so .vimrc the correct color for the comments is used. It appears as if only the highlighting stuff is ignored upon startup, but works when sourced explicitly.
EDIT #1: I don't have any
VIM environment variable set.
:verbose hi Comment says
Comment xxx term=bold ctermfg=14 guifg=#80a0ff Last set from /usr/local/share/vim/vim74/syntax/syncolor.vim
1: ~/.vimrc 2: /usr/local/share/vim/vim74/syntax/syntax.vim 3: /usr/local/share/vim/vim74/syntax/synload.vim 4: /usr/local/share/vim/vim74/syntax/syncolor.vim 5: /usr/local/share/vim/vim74/filetype.vim 6: /usr/local/share/vim/vim74/plugin/getscriptPlugin.vim 7: /usr/local/share/vim/vim74/plugin/gzip.vim 8: /usr/local/share/vim/vim74/plugin/logiPat.vim 9: /usr/local/share/vim/vim74/plugin/matchparen.vim 10: /usr/local/share/vim/vim74/plugin/netrwPlugin.vim 11: /usr/local/share/vim/vim74/plugin/rrhelper.vim 12: /usr/local/share/vim/vim74/plugin/spellfile.vim 13: /usr/local/share/vim/vim74/plugin/tarPlugin.vim 14: /usr/local/share/vim/vim74/plugin/tohtml.vim 15: /usr/local/share/vim/vim74/plugin/vimballPlugin.vim 16: /usr/local/share/vim/vim74/plugin/zipPlugin.vim
Now I ran out of ideas what is going on here and how to fix it. Someone hit me with the clue bat, please.