[英]Vim style folding for CSS/javascript in Visual Studio
Is anyone aware of a way to have VIM style folding in Visual Studio?有没有人知道在 Visual Studio 中进行VIM 样式折叠的方法? I use #region blocks in c# class files and they're great, but unfortunately there's no equivalent functionality for javascript and css.
我在 c# class 文件中使用 #region 块,它们很棒,但不幸的是,javascript 和 ZC7A628F562E28EB617B 没有等效功能。 The site/app I'm currently working on has a rather lot of css selectors and javascript and navigating the monolithic files is becoming difficult.
我目前正在处理的站点/应用程序有相当多的 css 选择器和 javascript 并且导航单个文件变得越来越困难。
One option that we've considered is breaking up the css and javascript into separate files similiar to jquery modules, but then that introduces performance problems in terms of increasing the overall number of http requests. One option that we've considered is breaking up the css and javascript into separate files similiar to jquery modules, but then that introduces performance problems in terms of increasing the overall number of http requests.
If anyone has any suggestions for managing the madness, I'd be greatly appreciative!如果有人对管理疯狂有任何建议,我将不胜感激!
Update : Richard Kimber suggestsusing the bookmarking features of visual studio to make navigating by headings more manageable.更新:Richard Kimber 建议使用 Visual Studio 的书签功能使按标题导航更易于管理。 This is a step in the right direction, but not as useful as code folding/blocking.
这是朝着正确方向迈出的一步,但不如代码折叠/阻塞有用。
I found a Microsoft extension that improved the JavaScript text editor for Visual Studio 2010.我发现了一个 Microsoft 扩展,它改进了 Visual Studio 2010 的 JavaScript 文本编辑器。
http://visualstudiogallery.msdn.microsoft.com/en-us/872d27ee-38c7-4a97-98dc-0d8a431cc2ed http://visualstudiogallery.msdn.microsoft.com/en-us/872d27ee-38c7-4a97-98dc-0d8a431cc2ed
I have used it, and it gives all of the following for JavaScript files:我已经使用了它,它为 JavaScript 文件提供了以下所有内容:
I know I'm not really helping with this one, but have you heard of ViEmu .我知道我并没有真正帮助解决这个问题,但你听说过ViEmu 吗? It is a, lets say, vim emulation within VS.
可以说,它是 VS 中的 vim 仿真。 Although it does not support all of vim's features, it does bring a flavor of it to VS navigation.
虽然它不支持 vim 的所有功能,但它确实为 VS 导航带来了一种味道。 I haven't used it myself, but others talk pretty good of it, so you might want to give it a shot.
我自己没有用过,但其他人说得很好,所以你可能想试一试。
I am currently using JScript Editor Extensions as Brian Grinstead suggested.我目前正在使用Brian Grinstead建议的JScript Editor Extensions 。 If it supports region folding, I haven't figured out how.
如果它支持区域折叠,我还没有弄清楚如何。 It does support function folding in JavaScript.
它确实支持 JavaScript 中的 function 折叠。
There are also JSEnhancements and JSOutlining .还有JSEnhancements和JSOutlining 。 Haven't tried either of those though.
虽然没有尝试过其中任何一个。
This issue is a partial duplicate of this and this .这个问题是this和this的部分副本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.