Visual Studio 2015 Javascript Outlining way too much
Asked Answered
T

1

5

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: enter image description here Is it possible to turn off outlining inside the functions? I just want the outlining at the function level.

Tingley answered 22/7, 2015 at 14:44 Comment(0)
A
7

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

Autorotation answered 24/7, 2015 at 13:0 Comment(3)
Ended up uninstalling VS 2015. It's not worth the hassle.Tingley
@Kathy So you uninstalled one of the best IDE's in the history of the world because it's too much effort to install an extension that tweaks a minor feature to your exact liking? Ultimately it's about what tools allow you to be most productive, so each to his own and all but unfortunately you may have thrown the baby out with the bath water.Picot
I don't use 95% of the features of VS 2013 and it will be the same with VS 2015. Also VS 2015 changed project structures which breaks my current projects.Tingley

© 2022 - 2024 — McMap. All rights reserved.