I am using some preset colorthemes, but it seems that the types Identifier
and Comment
always use the same color -- which makes my .asm
files basically just one color. I tried to change the color of the comments with:
:highlight Comment ctermfg=Blue
and it works when I do it directly in vim, but if I put it in my .vimrc
it does not work at all. Similar question here but doesn't work for me.
Just in case, this is my .vimrc
:
set tabstop=4
set shiftwidth=2
set autoindent
set expandtab
au InsertEnter * set ignorecase
au InsertLeave * set noignorecase
function! Html()
r~/.vim/code/html.txt
endfunction
map <F6> :tabp<CR>
map <F8> :tabn<CR>
map <F7> :tabe<Space>
" Disable expandtab for Makefiles
let _curfile = expand("%:t")
if _curfile =~ "Makefile" || _curfile =~ "makefile" || _curfile =~ ".*\.mk"
set noexpandtab
else
set expandtab
endif
syntax on
highlight Comment ctermfg=Blue
With or without syntax on
there's no effect.
I suspect something is changing the colors and overriding the effect of my .vimrc
command, but I don't know what.
:verbose hi comment
syncolor.vim
is loaded when you dosyntax on
. And it just resets colors to vim defaults. Try changehighlight
tohighlight! ...