I have files containing code within a prefix-based structure, such as:
perl: sub abc {
perl: return "def";
perl: }
I'd like to be able to highlight the perl as normal. i.e. ignore the perl: prefix. Using the built-in help for syntax I have:
syntax include @Perl syntax/perl.vim
syntax region testPerl start=/^perl: \?/ end=/$/ contains=testPerlContinue,@Perl
syntax match testPerlContinue "\$perl:" contained
However, as expected, this treats the perl: prefix as part of the code; an obvious example of this breaking is where a Perl 'quote' carries over several lines.
Is it possible to ignore prefixes within Vim when syntax highlighting?