-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Idea: A way to fold the *first* line, in similar to "foldLastLine": true
.
#95
Comments
It's available in the newest version but I've named it |
@daiyam Oh, nice! But it breaks when two folding markers cancel each other out on the same line. #include <iostream>
int main()
{
std::cout << "Hello!\n";
} I have folding rules for both Would be nice if the pairs of markers on the same line ( |
Can you give me your rules? |
"explicitFolding.rules": {
"cpp": [
{
"begin": "{",
"end": "}",
"foldBeforeFirstLine": true,
},
{
"begin": "(",
"end": ")",
"foldBeforeFirstLine": true,
},
]
} |
The new version ( |
Let's say I have this rule:
If I apply it to:
It folds to:
I can show or hide
}
using"foldLastLine"
, but there's currently no way to show/hide the{
. I.e. no way to fold that to:I think it would be nice to have something like
"foldFirstLine"
, which moves the start of the fold one line up.I'd then create two rules: one that matches a line that has nothing but
{
and whitespace ("foldFirstLine": true
), and the fallback one that matches{
elsewhere (false
).The text was updated successfully, but these errors were encountered: