In Visual Studio (2008) is there a command to collapse/expand all the sections of code in a file?
Uwe KeimReported by joachim.schumacher Oct 04 at 10:53 AM visual studio 2017 version 15.8 windows 10.0 editor. I have several classes and properties that require attributes. When I collapse the property code, the editor shows just one line, starting with the attributes and putting the. Download Visual Studio Code to experience a redefined code editor, optimized for building and debugging modern web and cloud applications. Download Visual Studio Code - Mac, Linux, Windows This site uses cookies for analytics, personalized content and ads.
Mr. Flibble19 Answers
CTRL + M + O will collapse all.
Visual Studio For Mac
CTRL + M + L will expand all. (in VS 2013 - Toggle All outlining)
CTRL + M + P will expand all and disable outlining.
CTRL + M + M will collapse/expand the current section.
CTRL + M + A will collapse all even in Html files.
These options are also in the context menu under Outlining.
Right click in editor -> Outlining to find all options.(After disabling outlining, use same steps to enable outlining.)
Super JadeThe following key combinations are used to do things:
CTRL + M + M →Collapse / Expand current preset area (e.g. Method)
CTRL + M + H → Collapse / Hide (Expand) current selection
CTRL + M + O → Collapse all(Collapse declaration bodies)
CTRL + M + A → Collapse all
CTRL + M + X → Expand all
CTRL + M + L → Toggle all
There some options in the context menu under Outlining.
Peter IvanCTL + M + L expands all
CTL + M + O collapses all
In the MSDN article 'Default Keyboard Shortcuts in Visual Studio,' see the section 'Text Editor' if you're looking for other shortcuts - these 2 are just a few of the many that are available.
DavidRR- Fold/Unfold the current code block – Ctrl+M, Ctrl+M
- Unfold all – Ctrl+M, Ctrl+L
- Stop outlining – Ctrl+M, Ctrl+P
- Fold all – Ctrl+M, Ctrl+O
In Visual Studio 2017, It seems that this behavior is turned off by default. It can be enabled under Tools > Options > Text Editors > C# > Advanced > Outlining > 'Collapse #regions when collapsing to definitions'
CTL + M + A collapses all
works for me, whereas
CTL + M + O
does not
Are you refering to the toggle outlining?
You can do:Control + M then Control + L to toggle all outlining
limeIn Visual Studio 2013:
CTL + M + A collapses all
CTL + M + L expands all
Nathan ChaseNathan ChaseBelow are all what you want:
- Collapse / Expand current Method
CTRL + M + M
- Collapse / Expand current selection
CTRL + M + H
- Collapse all
CTRL + M + O
CTRL + M + A
- Expand all
CTRL + M + X
CTRL + M + L
studentIf you mean shortcut then
CTRL + M + M: This one will collapse the region your cursor is at whether its a method, namespace or whatever for collapsing code blocks, regions and methods. The first will collapse only the block/method or region your cursor is at while the second will collapse the entire region you are at.
series0nePress
CTL + A
Then
CTL + M + M
To compress all, including child nodes, in XML-files.
To collapse all use:
Ctrl + M and Ctrl+A
All shortcuts for VS 2012/2013/2015 available at http://visualstudioshortcuts.com/2013/
studentIn case of ugrading to Visual Studio 2010, 2012, 2013 or 2015, there's a Visual Studio extension to show current registered keyboard shortcuts, IntelliCommand.
if you want to collapse and expand particular loop, if else then install following plugins for visual studio.
Juned AnsariJuned AnsariNone of these worked for me. What I found was, in the editor, search the Keyboard Shortcuts
file for editor.foldRecursively
. That will give you the latest binding. In my case it was CMD + K, CMD + [.
Collapse All - Ctrl + M + O
Expand All - Ctrl + M + L
Visual Studio can help you find the answer to your question in a couple of different ways.
Type Ctrl + Q to access Quick Launch, and then enter 'collap'. Quick Launch will display something like:†
From there, enter 'outlining' to find other menu entries related to outlining:
However, note that Quick Launch will show you only those commands that are available as Visual Studio menu entries. To find other keyboard-related commands related to collapsing sections of code, in the Visual Studio menu bar click:
This will display the keyboard section in the Options dialog box. In the 'Show commands containing' text box, enter 'edit.collap'. Visual Studio will display a list that is something like:
You'll need to click each command to see its associated keyboard shortcut.
† My examples taken from Visual Studio 2013.
DavidRRDavidRRIf you want to collapse/expand
an area within a class/method
(instead of collapsing the entire class/method
), you may create custom regions as follow:
Not the answer you're looking for? Browse other questions tagged visual-studio-2008visual-studio or ask your own question.
I just downloaded a VSIX file from the Visual Studio Gallery.
How do I install it in Visual Studio?
slhck8 Answers
VSIX is a Visual Studio extension installer. You must have Visual Studio 2010 or newer in order to install them, but you should be able to install it by double-clicking the .vsix file. Alternatively you should be able to install it from within the VS Extension Manager (Tools->Extension Manger)
See more about VSIX files at Quan To's Visual Studio Extensibility blog
heavydheavydThe above answers didn't help me; I couldn't install it through the extension manager and there was not default application for .vsix
. However, I needed to open it (right click >Open with...
) with Microsoft Visual Studio Version Selector
and it worked.
Small update:For VS 2013, you need the corresponding version of NuGet: http://visualstudiogallery.msdn.microsoft.com/4ec1526c-4a8c-4a84-b702-b21a8f5293ca.Otherwise, the version selecter will tell you it's already installed on all fitting versions.
To summarise, there are three options:
- Install via Extension Manager (Tools/Options)
- Install via Visual Studio Gallery.com (download and open directly or save then double-click)
- Install via 'xcopy' into %localappdata%MicrosoftVisualStudio10.0Extensions
If all the above options fail, try installing it from the command-line.Here's how (on StackOverflow):
VSIXInstaller.exe /quiet some_extension.vsix
You can find VSIXInstaller here (on your local PC - depending on the Visual Studio version replace 14.0 by the version you're using):
C:Program Files (x86)Microsoft Visual Studio 14.0Common7IDE
To display the installer dialog(s), remove the /quiet
option.
Note:
To uninstall a VSIX extension, you need to know its vsixID (here is described how to get it), then you can use
VSIXInstaller.exe /uninstall:vsixID
To install/uninstall VSIX files for a specific Visual Studio version, use the switches
/skuName:name
and/skuVersion:version
; you can see all options of the command line tool if you typeVSIXInstaller.exe /?
in the developer command prompt.
Visual Studio For Mac Os
Did you know that the VSIX is nothing more than a ZIP file. After double clicking on it, the VS selector prompts you for each installed version of Visual Studio to install it too. This is where vs picks an arbitrary folder name and unpacks the content to the %AppData%LocalMicrosoftVisualStudio##Extensions folder. So Benjol was partially correct save for unpacking the files from the VXIS(again which is a Zip).
VSIXInstallerinC:Program Files (x86)Microsoft Visual StudioInstallerresourcesappServiceHubServicesMicrosoft.VisualStudio.Setup.Service
I think you just reload Visual Studio after downloading the VSIX. During the launch Visual Studio looks for the VSIX file and incorporatesall the required changes.
Here are the instructions for Visual Studio Code.1 step
second step