Visual Studio 2010 中 Javascript 中的区域/代码崩溃

发布于 2024-09-03 05:10:54 字数 195 浏览 11 评论 0原文

是否可以在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

欢你一世 2024-09-10 05:10:54

这是一个非常酷的 VS2010 扩展,用于 Javascript 和 CSS 概述
http://jsoutlined.codeplex.com/

Here is a very cool VS2010 extension for Javascript and CSS outlining
http://jsoutlining.codeplex.com/

残月升风 2024-09-10 05:10:54

Microsoft 现在为 VS2010 提供了一个提供此功能的扩展:

JScript编辑器扩展

Microsoft now has an extension for VS2010 that provides this functionality:

JScript Editor Extensions

巷雨优美回忆 2024-09-10 05:10:54

Visual Studio 的 JSEnhancements 插件很好地解决了这个问题。

The JSEnhancements plugin for Visual Studio addresses this nicely.

别念他 2024-09-10 05:10:54

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

坚持沉默 2024-09-10 05:10:54

这里有一篇有趣的文章: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.

最冷一天 2024-09-10 05:10:54

另一个出色的 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/

债姬 2024-09-10 05:10:54

即使安装了 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

肤浅与狂妄 2024-09-10 05:10:54

在 VS 2015 中,您可以像这样围绕您的“区域”创建一个块,

{ //My little region
  function misc()...
  var x = '';
  //etc...
  ...
}

然后折叠该块。可能也适用于所有旧版本的 Visual Studio。

In VS 2015 you can just create a block around your "region" like this

{ //My little region
  function misc()...
  var x = '';
  //etc...
  ...
}

Then just collapse that block. Probably on all older versions of Visual Studio as well.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文