简体   繁体   中英

visual studio 2008 regions equivalent for javascript

visual studio 2008允许将c#代码分隔成区域是否有相当于javascript的东西?

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.

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

或者,您可以折叠Dreamweaver中的自定义代码部分,可能值得使用它来编辑JavaScript

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM