I've asked this question on StackOverflow and they suggested to ask it here. I am trying to set a custom syntax highlighting for BSD rc.conf file which looks like:
name=YES
anothername=NO
third="options"
I created years agoo a syntax file:
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
if !exists("main_syntax")
let main_syntax = 'sh'
endif
if version < 600
so <sfile>:p:h/sh.vim
else
runtime! syntax/sh.vim
unlet b:current_syntax
endif
syntax case match
syn keyword rcconfKeywordYes YES
syn keyword rcconfKeywordNo NO
let b:current_syntax = "rcconf"
hi def link rcconfKeywordYes Type
hi def link rcconfKeywordNo Special
This worked before, but now in vim 8 it works only if there are spaces between keywords and other symbols:
name = YES
anothername = NO
foo=bar
? You say "years ago"...note that pre-vim 6 this was apparently not using the standard sh.vim syntax file so maybe that's the difference.dosini
filetype?