I am writing a plugin where a certain filetype must possess their own syntax highlight. Therefore I have created
. ├── ... ├── plugin └── syntax
syntax clear syntax match MyPattern /regexpattern/ highlight default link MyPattern Title
regexpattern is a valid regex pattern that matches, say, vim search or vim regex functions, but that however does not work when having to match for syntax highlight. In the particular case at hand I want to highlight all lines containing dashes at the start of the line, therefore
/^--.*/. The same happens if instead of the
- one uses any other non-alphanumerical character.
Problem: regex pattern
^-- (or any similar one) does not work for the filetype in question when for syntax highlight.