Visual Studio 2010 中 Javascript 中的区域/代码崩溃
是否可以在 Visual Studio 2010 中的 JS 文件中创建代码区域?
此方法在2005年有效,但我无法得到2010年工作。
Is it possible to create code regions in JS files in Visual Studio 2010?
This method works in 2005, but I can't get working in 2010.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
这是一个非常酷的 VS2010 扩展,用于 Javascript 和 CSS 概述
http://jsoutlined.codeplex.com/
Here is a very cool VS2010 extension for Javascript and CSS outlining
http://jsoutlining.codeplex.com/
Microsoft 现在为 VS2010 提供了一个提供此功能的扩展:
JScript编辑器扩展
Microsoft now has an extension for VS2010 that provides this functionality:
JScript Editor Extensions
Visual Studio 的 JSEnhancements 插件很好地解决了这个问题。
The JSEnhancements plugin for Visual Studio addresses this nicely.
Visual Studio 11 的高级 JavaScript 大纲现在可通过扩展管理器或 URL
http://visualstudiogallery.msdn.microsoft.com/4be701d8-af03-40a4-8cdc-d2add5cde46c?SRC=VSIDE
Advanced JavaScript Outlining for Visual Studio 11 is now available for VS2012 through the Extension Manger, or at the URL
http://visualstudiogallery.msdn.microsoft.com/4be701d8-af03-40a4-8cdc-d2add5cde46c?SRC=VSIDE
这里有一篇有趣的文章:http://blog。 devarchive.net/2008/04/using-region-directive-with-javascript.html 了解如何在 Visual Studio 中使用宏来执行此操作。
希望有帮助。
更新
我刚刚意识到有人已经在评论中引用了此链接。
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.
Hope that help.
Update
I just realised that someone has already referenced this link in the comments.
另一个出色的 Visual Studio 2012 扩展是 Web Essentials 2012。
甚至还有很多适用于 TypeScript、LESS 和 CoffeeScript 的很酷的工具。
http://vswebessentials.com/
Another great Visual Studio 2012-Extension is Web Essentials 2012.
There are a bunch of cool tools for even TypeScript, LESS and CoffeeScript.
http://vswebessentials.com/
即使安装了 VS 扩展,我还是遇到了一个独特的问题,即某些脚本块没有正确概述,后来发现这是因为脚本中使用了 @Url.Content 标签,只需将其替换为简单的字符串 url,大纲有效....如果对某人有帮助的话就考虑分享
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 2015 中,您可以像这样围绕您的“区域”创建一个块,
然后折叠该块。可能也适用于所有旧版本的 Visual Studio。
In VS 2015 you can just create a block around your "region" like this
Then just collapse that block. Probably on all older versions of Visual Studio as well.