Comments (7)
VS Code supports Python folding out of the box
See also default Python config file in (Windows)
C:\Program Files\Microsoft VS Code\resources\app\extensions\python
"folding": {
"offSide": true,
"markers": {
"start": "^\\s*#region\\b",
"end": "^\\s*#endregion\\b"
}
}
You need to hover over margin to see the marker. It is controlled by
from vscode-python.
works fine until you format the document. then '#region' becomes '# region' and the functionality does not work.
from vscode-python.
@lpravda can you file a separate issue for this? I assume you have formatOnSave
turned on?
from vscode-python.
when i use Shift+Alt+F, "#region" -> "# region"
from vscode-python.
@lpravda @B3Bo1d
you can change
C:\Program Files\Microsoft VS Code\resources\app\extensions\python\language-configuration.json
(in windows) or
/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/extensions/python/language-configuration.json
(in mac) as follows, and reopen vscode then it should works for "# region"
"folding": {
"offSide": true,
"markers": {
"start": "^\\s*#\\s*region\\b",
"end": "^\\s*#\\s*endregion\\b"
}
}
from vscode-python.
works like a charm :)
from vscode-python.
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.
from vscode-python.
Related Issues (20)
- Regression in sendToRepl - incorrectly passes selected text to repl HOT 3
- Support variable exploration in the native REPL
- Incorporate feedback on the environment manager extension
- Enable Proposed API `codeActionAI` HOT 1
- Indentation Errors in VS Code When Running Old Python Functions with Docstrings/Comments Using Shift + Enter HOT 11
- Python environments not detected/found in devcontainer on WSL 2 HOT 9
- Jedi Language Server not launching on v2024.14.0 HOT 1
- Redundant @typescript-eslint/no-explicit-any suppression
- Avoid adding types to jsdocs for TS files HOT 1
- Python: Iteration Plan for September 2024
- Better documentation for Smart Send HOT 1
- Combination of Docstring and empty line in function breaks sending code to REPL (IndentationError) HOT 4
- Unit Test discovery executes code found in any `__init__.py` file, causing odd effects. HOT 2
- can't get python extension work on void linux HOT 9
- "terminalShellIntegration" missing from package.json "enabledApiProposals" HOT 2
- Python Test uses incorrect python environment HOT 10
- python and pylance keep throwing errors: unexpected indentation HOT 1
- [BUG] (Shift + Enter) breaks when encountering triple quotes (Python REPL) HOT 3
- Extension fails to activate unnamed conda environments HOT 1
- PS1 missing parenthesis around `venv` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-python.