Is it possible to create code regions in JS files in Visual Studio 2010?
是否可以在Visual Studio 2010中的JS文件中创建代码区域?
This method works in 2005, but I can't get working in 2010.
这种方法适用于2005年,但我无法在2010年开始工作。
8 个解决方案
#1
37
Here is a very cool VS2010 extension for Javascript and CSS outlining http://jsoutlining.codeplex.com/
这是一个非常酷的VS2010扩展,用于Javascript和CSS概述http://jsoutlining.codeplex.com/
#2
33
Microsoft now has an extension for VS2010 that provides this functionality:
Microsoft现在有一个VS2010的扩展,它提供了这个功能:
JScript编辑器扩展
#3
1
The JSEnhancements plugin for Visual Studio addresses this nicely.
Visual Studio的JSEnhancements插件很好地解决了这个问题。
#4
1
Advanced JavaScript Outlining for Visual Studio 11 is now available for VS2012 through the Extension Manger, or at the URL
Visual Studio 11的高级JavaScript大纲现在可通过Extension Manger或URL在VS2012中使用
http://visualstudiogallery.msdn.microsoft.com/4be701d8-af03-40a4-8cdc-d2add5cde46c?SRC=VSIDE
http://visualstudiogallery.msdn.microsoft.com/4be701d8-af03-40a4-8cdc-d2add5cde46c?SRC=VSIDE
#5
0
There's an interesting post here : http://blog.devarchive.net/2008/04/using-region-directive-with-javascript.html on how to do this using Macros in Visual Studio.
这里有一篇有趣的帖子:http://blog.devarchive.net/2008/04/using-region-directive-with-javascript.html,了解如何在Visual Studio中使用宏来完成此任务。
Hope that help.
希望有所帮助。
Update I just realised that someone has already referenced this link in the comments.
更新我刚刚意识到有人已在评论中引用此链接。
#6
0
Another great Visual Studio 2012-Extension is Web Essentials 2012. There are a bunch of cool tools for even TypeScript, LESS and CoffeeScript.
另一个伟大的Visual Studio 2012扩展是Web Essentials 2012.有许多很酷的工具,甚至可以用于TypeScript,LESS和CoffeeScript。
http://vswebessentials.com/
#7
0
Even though VS extensions installed, I had a unique problem of some of the script blocks not outlining properly, later found that its because of the @Url.Content tag used in the script, simply replaced it with simple string url, the outlining worked....thought of sharing if it helps someone
即使安装了VS扩展,我也有一个独特的问题,一些脚本块没有正确概述,后来发现它是因为脚本中使用的@ Url.Content标记,只需用简单的字符串url替换它,外形工作正常。 ...如果它可以帮助某人,那就想分享吧
#8
0
In VS 2015 you can just create a block around your "region" like this
在VS 2015中,您可以像这样围绕“区域”创建一个块
{ //My little region
function misc()...
var x = '';
//etc...
...
}
Then just collapse that block. Probably on all older versions of Visual Studio as well.
然后只是崩溃那块。可能也适用于所有旧版本的Visual Studio。
#1
37
Here is a very cool VS2010 extension for Javascript and CSS outlining http://jsoutlining.codeplex.com/
这是一个非常酷的VS2010扩展,用于Javascript和CSS概述http://jsoutlining.codeplex.com/
#2
33
Microsoft now has an extension for VS2010 that provides this functionality:
Microsoft现在有一个VS2010的扩展,它提供了这个功能:
JScript编辑器扩展
#3
1
The JSEnhancements plugin for Visual Studio addresses this nicely.
Visual Studio的JSEnhancements插件很好地解决了这个问题。
#4
1
Advanced JavaScript Outlining for Visual Studio 11 is now available for VS2012 through the Extension Manger, or at the URL
Visual Studio 11的高级JavaScript大纲现在可通过Extension Manger或URL在VS2012中使用
http://visualstudiogallery.msdn.microsoft.com/4be701d8-af03-40a4-8cdc-d2add5cde46c?SRC=VSIDE
http://visualstudiogallery.msdn.microsoft.com/4be701d8-af03-40a4-8cdc-d2add5cde46c?SRC=VSIDE
#5
0
There's an interesting post here : http://blog.devarchive.net/2008/04/using-region-directive-with-javascript.html on how to do this using Macros in Visual Studio.
这里有一篇有趣的帖子:http://blog.devarchive.net/2008/04/using-region-directive-with-javascript.html,了解如何在Visual Studio中使用宏来完成此任务。
Hope that help.
希望有所帮助。
Update I just realised that someone has already referenced this link in the comments.
更新我刚刚意识到有人已在评论中引用此链接。
#6
0
Another great Visual Studio 2012-Extension is Web Essentials 2012. There are a bunch of cool tools for even TypeScript, LESS and CoffeeScript.
另一个伟大的Visual Studio 2012扩展是Web Essentials 2012.有许多很酷的工具,甚至可以用于TypeScript,LESS和CoffeeScript。
http://vswebessentials.com/
#7
0
Even though VS extensions installed, I had a unique problem of some of the script blocks not outlining properly, later found that its because of the @Url.Content tag used in the script, simply replaced it with simple string url, the outlining worked....thought of sharing if it helps someone
即使安装了VS扩展,我也有一个独特的问题,一些脚本块没有正确概述,后来发现它是因为脚本中使用的@ Url.Content标记,只需用简单的字符串url替换它,外形工作正常。 ...如果它可以帮助某人,那就想分享吧
#8
0
In VS 2015 you can just create a block around your "region" like this
在VS 2015中,您可以像这样围绕“区域”创建一个块
{ //My little region
function misc()...
var x = '';
//etc...
...
}
Then just collapse that block. Probably on all older versions of Visual Studio as well.
然后只是崩溃那块。可能也适用于所有旧版本的Visual Studio。