balalakshmi
balalakshmi

Reputation: 4208

visual studio 2008 regions equivalent for javascript

visual studio 2008 allows c# code to be segregated into regions is there an equivalent for javascript?

Upvotes: 4

Views: 1025

Answers (3)

slugster
slugster

Reputation: 49985

There is a way to do this in VS2008: highlight the section of code you want to collapse, then press the Ctrl-M+H chord.

I use this quite a bit when editing javascript files, but unfortunately it isn't permanent - the javascript code will be back to its regular self if you close and reopen the file. I've had js files open for weeks at a time in the editor in the past, simply to avoid losing all my carefully crafted collapsible regions.

Upvotes: 4

Nick Allen
Nick Allen

Reputation: 12220

Alternatively you can collapse custom code sections in Dreamweaver, might be worth editing your JavaScript using that instead

Upvotes: 0

Kronass
Kronass

Reputation: 5406

Unfortunately Javascript don't support this. You can do the separation by comments.

/*My Region (Name It)*/
your scripts
/*End Region*/

Or you can see this thread how to do it. how to implement regions/code collapse in javascript

Upvotes: 2

Related Questions