Linked Questions
33 questions linked to/from How do I fold/collapse/hide sections of code in Visual Studio Code?
7
votes
1
answer
23k
views
Collapse Region VSCode [duplicate]
I want to fold the following lines of code in VSCode
x = np.linspace(0, 20, 100)
plt.plot(x, np.sin(x))
plt.show()
How do I do this? ctrl + shift + [ only collapses functions.
1
vote
1
answer
7k
views
Fold and unfold code in Visual Studio CODE [duplicate]
I can't find out how to fold and unfold code (like javascript functions) in Visual Studio Code.
In Visual Studio the shortcut is "Ctrl + L", but it doesn't work in Visual Studio Code (not the full ...
2
votes
1
answer
4k
views
How to group a section of code into a collapsible segment in VS Code [duplicate]
I have about 50 lines of C code that I want to collapse. It's at the top-level, containing globals, typedefs, defines, etc. The only way I've figured out how to do this is by making a fake function, ...
0
votes
0
answers
297
views
VS Code: divide Python code block into regions - how to mark regions? [duplicate]
How to apply regions for python code in Visual Studio Code?
I would like to do this like in VS C#:
#region
// some methods
#endregion
-1
votes
1
answer
158
views
Is there a way to collapse multiple functions at once but not all of them in vscode? [duplicate]
I want to group multiple lines of CSS code into a single collapsible section, is there a way to do that in vscode?
I tried to use brackets but that didnt work. I tried other things as well but ...
1138
votes
13
answers
973k
views
Collapse all methods in Visual Studio Code
In Visual Studio Professional, we have a shortcut key, Ctrl + M Ctrl + O to collapse all methods and properties in a class. How can I do a similar thing in Visual Studio Code?
I know there are ...
842
votes
15
answers
1.2m
views
What are the differences between Visual Studio Code and Visual Studio?
Microsoft recently released Visual Studio Code and I am a little confused about its usage, since Visual Studio has lot of functional similarities with it.
337
votes
6
answers
360k
views
Visual studio code - keyboard shortcuts - expand/collapse all
Trying to find the equivalent to Ctrl + Shift + - in Intellij that collapses/expands all functions.
33
votes
5
answers
63k
views
VSCode: how to fold arbitrary/manual lines of code?
By "VS Code" I mean the lightweight text editor not the monolithic IDE, unfortunately searching this on google will bring up many pieces of irrelevant information about how to do this in Visual Studio....
16
votes
5
answers
17k
views
How to hide/unhide comments with Microsoft VSCode?
I have a codebase with many comments, how can I hide these, without deleting them since I will need them later.
I want to hide all the comments with one click or keystroke, not a simple collapse of ...
17
votes
4
answers
11k
views
When folding a line in VS Code is it possible to override the indentation and choose which lines are included in that fold?
Is it possible to customize the way code folding works in Visual Studio Code?
I use a common pattern of defining regions of code across a variety of different document types.
So, for XML I wrap ...
6
votes
1
answer
8k
views
How to fold/expand all functions in a selection in Visual Studio Code
Is there a way to fold/expand a large selection of functions(javascript code) in Visual Studio Code?
6
votes
3
answers
6k
views
How do I collapse an arbitrary selection of code in Visual Studio Code for Windows
How do I fold or collapse an arbitrary selection of code in Visual Studio Code? Is this feature supported?
Of course Sublime and Atom know this for ages.
11
votes
3
answers
3k
views
Unfold all sections in selected section
So in Visual Studio, if I have a collapsed function code, when I unfold it, it also unfolds all the ifs, switches etc. inside of it.
In Visual Studio Code, however, if I go for Fold All (Ctrl+K Ctrl+0)...
9
votes
3
answers
6k
views
VS Code: Folding code with [+] [-] sign instead of the default [>] [∨]
Summary: I want 2 things:
(1) I want my folding symbols in VS Code to be [+][-] (similar to Visual Studio) instead of the default [>][v] one
(2) I want my Extensions section can have downloads and ...