-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
#region Support #33
Comments
VS Code supports Python folding out of the box See also default Python config file in (Windows)
You need to hover over margin to see the marker. It is controlled by |
works fine until you format the document. then '#region' becomes '# region' and the functionality does not work. |
@lpravda can you file a separate issue for this? I assume you have |
when i use Shift+Alt+F, "#region" -> "# region" |
@lpravda @B3Bo1d "folding": {
"offSide": true,
"markers": {
"start": "^\\s*#\\s*region\\b",
"end": "^\\s*#\\s*endregion\\b"
}
} |
works like a charm :) |
Automatic formatting inserts a space between the comment marker `#` and text in the Python extension, so without the allowance for whitespace then `"editor.formatOnType": true` breaks all region markers. Closes microsoft/vscode-python#1073 and microsoft/vscode-python#33
This landed upstream in VS Code 4 minutes ago, so should be able to validate this in a day or so in the Insiders build. |
I know it's not usual in the Python environment, but adding support for regions, which are in turn supported by VSCode since 1.17[1], would be a really nice feature. Often I work with large classes which have a lot of methods, which are grouped already, but being able to completely fold all regions I'm not working on right now would make for a smoother editing experience I think.
[1] https://code.visualstudio.com/updates/v1_17#_folding-regions
The text was updated successfully, but these errors were encountered: