vim语法高亮问题
foo [内容] bar '''
更多
'''更多东西
syntax region specialCommand start='\<foo\s' end='$' skip='&$'
\ keepend contains=tripleQuoted
syntax region tripleQuoted start=+\<bar\s\+\z("""\|'''\)+ms=e+1 end='\ze\z1' contained extend
匹配是绑定至行的,因而ms=e+1在行后不工作.
syntax region tripleQuoted matchgroup=specialCommand
\ start=+\<bar\s\+\z("""\|'''\)+
\ end='\z1' contained extend
这样,来修复.
必须设置匹配组为父区域,matchgroup=specialCommand出现在开始和结束匹配模式前也很重要,
浙公网安备 33010602011771号