Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to do region collapse for JS in Visual Studio 2012/2013

Tags:

Region code collapse for JS in Visual Studio 2012 and 2013 ?

#region AutoComplete JS $("#<%=txtBirim.ClientID %>").autocomplete({    source: function (request, response) {      $.ajax({        url: '<%=ResolveUrl("~/Classlar/TextboxOtomatik.asmx/BirimGetir") %>',        data: "{ 'prefix': '" + request.term + "'}",        dataType: "json",        type: "POST",        contentType: "application/json; charset=utf-8",        success: function (data) {        response($.map(data.d, function (item) {          return {          label: item.split('-')[0],          val: item.split('-')[1]        }       }))      },     Code.... #endregion 

Is there anyway to do something like this ?

like image 743
TheMuyu Avatar asked Nov 12 '14 07:11

TheMuyu


People also ask

How do I collapse a region in Visual Studio?

You can change it in Tools > Options > Environment > Fonts and Colors > Collapsible Region.

How do you collapse a function in Visual Studio?

Fold Recursively (Ctrl+K Ctrl+[) folds the innermost uncollapsed region at the cursor and all regions inside that region. Unfold Recursively (Ctrl+K Ctrl+]) unfolds the region at the cursor and all regions inside that region. Fold All (Ctrl+K Ctrl+0) folds all regions in the editor.

How do I Collapse a region in Visual Studio?

You can also collapse an outlining region by double-clicking any line in the region on the outlining margin, which appears just to the left of the code. You can see the contents of a collapsed region as a tooltip when you hover over the collapsed region. This topic applies to Visual Studio on Windows.

How to have regions in Visual Studio 2013?

Visual Studio 2013 lets the developers to have regions within the CSS file and logically group your style rules with in the region . The region here lets the developers to hide them when they don’t need them and display it when needed. Simply add #region within the comment /* */ and then provide the region name .

How do I collapse an outlining region in Revit?

You can also collapse an outlining region by double-clicking any line in the region on the outlining margin, which appears just to the left of the code. You can see the contents of a collapsed region as a tooltip when you hover over the collapsed region.

How do I change the collapsible region of my code?

You can change it in Tools > Options > Environment > Fonts and Colors > Collapsible Region. When you work in outlined code, you can expand the sections you want to work on, collapse them when you are done, and then move to other sections.


1 Answers

Install web essentials

Use the same name in end region

//#region AutoComplete JS $("#<%=txtBirim.ClientID %>").autocomplete({       source: function(request, response) {           $.ajax({                 url: '<%=ResolveUrl("~/Classlar/TextboxOtomatik.asmx/BirimGetir") %>',                 data: "{ 'prefix': '" + request.term + "'}",                 dataType: "json",                 type: "POST",                 contentType: "application/json; charset=utf-8",                 success: function(data) {                   response($.map(data.d, function(item) {                     return {                       label: item.split('-')[0],                       val: item.split('-')[1]                     }                   }))                 },                 Code.... //#endregion AutoComplete JS 
like image 58
Pandiyan Cool Avatar answered Oct 06 '22 18:10

Pandiyan Cool