You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The m2Base10Num pattern is not a string literal. The quotes in this case are just pattern delimiters, any character can be used. So, if you wish, it can be split over multiple lines using a normal line continuation and insert comments with a leading "\ sequence (trailing space required - see :help line-continuation-comment).
synmatchm2Base10Num\ /\(\(0[bux]\@!\|[1-9]\)[0-9]*\('[0-9]\+\)*\)"\ a comment\\(\.[0-9]\+\('[0-9]\+\)*\(e[+-]\?[0-9]\+\('[0-9]\+\)*\)\?\)\?/
Alternatively you could use something like the following to interleave comments as described.
" a comment for part 1let part1 ='\(\(0[bux]\@!\|[1-9]\)[0-9]*\(''[0-9]\+\)*\)'" a comment for part 2let part2 ='\(\.[0-9]\+\(''[0-9]\+\)*\(e[+-]\?[0-9]\+\(''[0-9]\+\)*\)\?\)\?'exe$"syn match m2Base10Num2 /{part1}{part2}/"
Obviously, neither of these are as nice as Perl's x modifier but maybe they're of some use to you.
Regards,
Doug
The text was updated successfully, but these errors were encountered:
G'day Benjamin,
I just noticed the following comment in one of the Vim syntax files.
M2-Syntax-Colour/Vim/m2r10.vim
Lines 148 to 167 in 133e009
The
m2Base10Num
pattern is not a string literal. The quotes in this case are just pattern delimiters, any character can be used. So, if you wish, it can be split over multiple lines using a normal line continuation and insert comments with a leading"\
sequence (trailing space required - see:help line-continuation-comment
).Alternatively you could use something like the following to interleave comments as described.
Obviously, neither of these are as nice as Perl's x modifier but maybe they're of some use to you.
Regards,
Doug
The text was updated successfully, but these errors were encountered: