language-batchfile
language-batchfile copied to clipboard
Recognize "*" prefix of pattern substitution (%v:*s=r%)
This is a feature request.
SET var=banana
ECHO %var:*NA=An% & REM Output: Anna
ECHO %var:NA=s% & REM Output: bass
SET var=f*cker
ECHO %var:**CK=bust% & REM Output: buster
ECHO %var:**C=ba% & REM Output: baker
ECHO %var:*F*C=coo% & REM Output: cooker
The first asterisk * in the pattern should be recognized as special.
For the example screenshot below, the first asterisk right after the colon is better colored red just like the colon is:

I could see scoping this as keyword.other.special-method, in some themes that would make it the same color as other keywords, such as the ECHO. Some people have a hard time with punctuation that's marked as a keyword though, but most themes don't specifically mark punctuation, so you end up with the theme of a higher scoping, in this case, variable.other.