Visual Studio 2015 seams to outline all the multiline javascript code. I have a simple code like this:
$(document).ready(function ()
{
var x = {
test1: 1,
test2: 2
};
if (1 == 1)
{
// this is a test
}
});
Visual Studio 2015 outlines it like this when I press Ctrl+k, Ctrl+O
:
Is it possible to turn off outlining inside the functions? I just want the outlining at the function level.
Tools >> Options > Text Editor > Transact-SQL > IntelliSense > Uncheck Outline statements. For me, the vertical line isn't just visually distracting, it gets in the way anytime I want to select an entire line using my mouse.
PHP Editor allows you to collapse the content of functions, classes, namespaces and PHPDoc to have a better overview of your code.
The Outline view is a separate section in the bottom of the File Explorer. When expanded, it will show the symbol tree of the currently active editor. The Outline view has different Sort By modes, optional cursor tracking, and supports the usual open gestures.
No you cant do it BUT there is the excellent Web Essentials which will outline regions in javascript!
You create a region after a comment like this //#region & end it //#endregion
So what I do is forget about using keyboard shortcuts and manage it manually with the mouse, bit more work but I can have 'working' regions of code open and huge chunks closed and this allows me to easily swap working and non working regions.
EDIT
Web essentials has changed a lot, I don't use it anymore. I now use a Advanced JavaScript outlining which does the job nicely.
EDIT VS2017 Ok so the above don't work with VS2017 so now I use Mads Kristensen's Javascript Regions
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With