Closed deping closed 6 years ago
@deping, it helps if you also post file names you are trying to match, without that, I'm just going guess what some of your problems are.
You are matching a-b
in your file name, did you mean a-z
?
I'm not quite sure what you are trying to match with this (\\|/)VC(\\|/).(\\|/)[a-bA-Z0-9_]+$
.
I would first make sure your regex can match your target files names before putting them in a rule. I suspect that none of those regex will work like you want them to.
I feel like this has been answered, so I am closing this. If you verify your regex is well formed and can actually match your desired files, and you still have issues, feel free to reopen and post more details.
Thanks for reply! I actually want to make all files under VC is treated as cpp file. Yes, [a-bA-Z0-9] should be [a-zA-Z0-9]. Can we treat all files without extension as cpp file?
// Put your custom syntax rules here: "syntaxes": [ { "syntax": "C++/C++", "rules": [ {"filepath": ".(\\|/)VC(\\|/).(\\|/)[a-bA-Z0-9]+$"}, {"filepath": ".*(\\|/)VC(\\|/)[a-bA-Z0-9]+$"} ] } ]