language-batchfile icon indicating copy to clipboard operation
language-batchfile copied to clipboard

Recognize "*" prefix of pattern substitution (%v:*s=r%)

Open Explorer09 opened this issue 8 years ago • 1 comments

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: screenshot

Explorer09 avatar May 27 '17 19:05 Explorer09

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.

msftrncs avatar Sep 24 '18 05:09 msftrncs