Here, \\1 would expand to the value of the capture group ([a-z]+) in beginRegex.
So, for example:
begin foo // beginRegex matches this line
blah blah
end // endRegex does not match this line
end foo // endRegex matches this line
VSC supports this feature in language grammars, so I think it would be nice to have it in this extension too.
The reason I want this feature is to be able to fold so-called raw strings in C++:
string s = R"foo( // the string starts here, folding begins here
aaa // this part is folded
)" // this is a part of the string, doesn't affect folding
bbb // this part is still folded
)foo" // the string ends here, folding ends here
First of all, thanks a lot for fixing #4! Now I can use your extension instead of the silly indentation-based folding, yay!
I'm writing folding rules for C++ now, and I have a rather obscure feature request for you.
In short, I propose this syntax:
Here,
\\1
would expand to the value of the capture group([a-z]+)
inbeginRegex
.So, for example:
VSC supports this feature in language grammars, so I think it would be nice to have it in this extension too.
The reason I want this feature is to be able to fold so-called raw strings in C++: