I believe this is a pretty straight forward question. In Visual Studio 2015, Ctr+M+O collapsed all sections. I learned this trick from here: Visual Studio - Command to collapse all sections of code? Unfortunately, his does not work in Visual Studio 2017.
Use Ctrl + M + A to collapse all, but first you need to enable it through Tools > Options > Text Editor > C# > Advanced > Outlining > Tick Collapse #regions when collapsing to definitions.
Related
I am using Visual Studio 2022 for Mac (currently v17.4). I want to change tab size as they are too big. I cannot see such option anywhere and even in the documentation it says it doesn't apply to Visual Studio for Mac. Is it possible that it isn't implemented in such a popular IDE or am I missing something?
Tools > Options > Text Editor and then choose All Languages > Tabs or [Specific language] > Tabs. From there you can choose how VS handles your tabs/spaces and auto-formatting of such.
I've noticed that all of a sudden the following lines have appeared in Visual Studio 2017 Professional:
Does anyone know what they are and how to disable them?
Possible duplicate with : Why does the Visual Studio editor show dots in blank spaces?
In short :
Visual Studio is configured to show whitespace.
Press Ctrl+R, Ctrl+W.
If you are using C# keyboard mappings: (thanks Simeon)
Press Ctrl+E, S.
If you want to use the menu: (thanks angularsen)
Edit > Advanced > View White Space
I'm using Visual Studio 2015 Community and Resharper 9.
In XAML Editor, when typing some element, two pop-up lists of intellisense shown up, one of VS Intellisense, the other one is from Resharper.
Could anybody help me with this problem? Thank you!
ReSharper version info
Visual Studio version info
This is due to a change in Visual Studio - the XAML editor was replaced/updated and got a new GUID, which your version of ReSharper doesn't recognise. So, it doesn't know to block Visual Studio's code completion, but still knows it's a XAML file, so shows its own, and you end up with two code completion windows.
The easiest fix is to update to the latest version of ReSharper, which has fixed this. Alternatively, you can try and disable Visual Studio's code completion for XAML in Tools → Options → Text Editor, or disable ReSharper's code completion for XAML in ReSharper → Options → Intellisense.
There is a post that goes on about Visual Studio with 'intelligent' word wrap in How to make word wrap respect indentation in Visual Studio?
However - its a personal preference and can make code more unreadable in some cases.
In Visual Studio 2013 - this auto-indentation is default behavior.
How do you in Visual Studio 2013 turn this off?, so we get word-wrapping going back to the previous way - all-left aligned?
There doesn't appear to be an option in Visual Studio Options, or maybe I am missing something. If it is missing in Visual Studio Options, does anyone know of an add-in that will reset this auto-indentation?
I have VS2010 but try this:
Options/Text Editor/C#/Tabulations and then at identation block select none.
PS. You have to expand the options, if you select text editor it will show only the general options for text editor.
Is it possible to display paragraph marker in Visual Studio Source Code Editor?
Eclipse has this option, is it implemented in Visual Studio?
thx
Go to Edit > Advanced > View Whitespace (or Ctrl+R, Ctrl+W)