I have code like this:
# some comment
comment This is a comment \
that continues.
keyword option=3.123e4
Comments start with either “#” or “comment” and can continue with “\” and a line break.
I would like to match the next line after the last “\” as well or until a keyword from the list.
Here is what I have:
syn match atlasComment "#.*$"
syn match atlasComment "comment.*$"
syn keyword myKeyword keyword anotherKW nextgroup=myOption skipwhite
syn keyword myOption option
Is it possible to use a range from “comment” to a specifiet keyword from list of keywords that are highlighted anyway? Or is there a better way?
You’ll find some useful hints at
:help :syn-oneline.This leads to the following solution: