I'm trying to create a new custom colorscheme and syntax highlighting. I have copied some examples into ~/.vim/colors/ and ~/.vim/syntax with new names inside for the scheme.
All the basics work fine, so happy with the files.
I am trying to get some custom colour comments working, rather than just a single one, so something similar to
# = Normal comment
##1 = Red
##2 = Dark Red
In my colorscheme I have (that I can't get working)
hi Comment term=bold ctermfg=4 guifg=#406090
hi Comment1 term=bold ctermfg=4 guifg=#a00000
hi Comment2 term=bold ctermfg=4 guifg=#800000
"" I want to reference these
In my syntax file I have...
HiLink perlComment Comment
HiLink perlComment1 Conditional
HiLink perlComment2 String
syn match perlComment "#.*" contains=perlTodo
syn match perlComment1 "##1.*" contains=perlTodo
syn match perlComment2 "##2.*" contains=perlTodo
This partly works, in that I can get the unique comment highlighting working, but ONLY if I match it to a String/Conditional/Comment, i.e an already established 'keyword' or colorshceme or something (not sure what the term is here).
So I was thinking I could do something like...
HiLink perlComment2 Comment2
To match the earlier colorscheme settings (but this doesn't work, I can't seem to reflect changes from the colorscheme file), so I'm likely misunderstanding what's happening.
Is there a way to create a custom term like String/Conditional that would match in the colorscheme ? I think I'm missing a link somewhere.
HiLink perlComment2 Comment2
not work?:verbose hi Comment2
?:verbose hi perlComment2
? And:syntax list perlComment2