Reputation: 209
I'm building a color scheme from scratch and as I came past the syntax group I noticed a lot of inconsistency overall.
hi Comment ctermfg=129 ctermbg=129 cterm=italic
hi Boolean ctermfg=3 ctermbg=none cterm=bold
The comments are basically ignored as they should be both purple and italic, instead they're both a different color and not italic. The booleans as well both show a different color but they do appear to be bold.
hi String ctermfg=10 ctermbg=none cterm=italic
The string on the other hand has no trouble whatsoever.
I used a Javascript and Python file for testing here but it messes up everywhere (CSS, HTML, Rust, C, Shell).
I'm using rxvt-unicode and have no trouble assigning the purple color to the string.
Kind of unsure on how to proceed here. What could be the problem?
Upvotes: 0
Views: 393
Reputation: 9273
First ensure that you are looking at the correct line, i.e., that code is using the highlight group that you think it should. You could use the following mapping from the vim tips:
map <F10> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<'
\ . synIDattr(synID(line("."),col("."),0),"name") . "> lo<"
\ . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>
By hitting F10 it will display the highlight group off the word under the cursor.
If the problem remains you could:
You may also be interested on ColorSchemeEditor plugin:
This plugin provides a GUI tool which simplifies creating/editing Vim colorscheme files. It consists of a Vim plugin as well as a Python program, and utilizes Vim's command server interface |clientserver| for communications.
Upvotes: 1