最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Visual Studio 2015 Javascript Outlining way too much - Stack Overflow

programmeradmin5浏览0评论

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.

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.

Share Improve this question asked Jul 22, 2015 at 14:44 Kathy JuddKathy Judd 7373 gold badges10 silver badges24 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 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 ment 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

发布评论

评论列表(0)

  1. 暂无评论