简体   繁体   English

Vim Visual Studio 中 CSS/javascript 的样式折叠

[英]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 文件提供了以下所有内容:

  • Brace Matching大括号匹配
  • Outlining / Code-folding大纲/代码折叠
  • Current Word Highlighting当前单词突出显示
  • IntelliSense Doc-Comments Support IntelliSense 文档评论支持

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 .还有JSEnhancementsJSOutlining Haven't tried either of those though.虽然没有尝试过其中任何一个。

This issue is a partial duplicate of this and this .这个问题是thisthis的部分副本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 JavaScript 文件中的语法折叠在 Vim 中不起作用 - Syntax folding in JavaScript files does not work in Vim Visual Studio中的JavaScript-闭合样式注释 - JavaScript in Visual Studio - Closure style comments Visual Studio 2012:更改javascript评论样式 - Visual Studio 2012: change javascript comment style Visual Studio Code - 如何防止注释折叠 - Visual Studio Code - How to prevent comment folding vim是否有任何插件可以像在Visual Studio中格式化javascript一样格式化Java? - Are there any plugin for vim to format javascript like formatting in Visual Studio? 如何在 Css 和 JavaScript 中创建折纸效果? - How to create paper folding effect in Css and JavaScript? Vis中Javascript / Jquery的Rails.js.erb的良好折叠/缩进? - Good folding/indenting for Rails.js.erb for Javascript/Jquery in Vim? 是否有Visual Studio的javascript / css压缩器插件? - Is there a javascript/css compressor plugin for visual studio? Visual Studio中的Javascript和CSS资产打包 - Javascript and CSS Asset Packaging in Visual Studio 有没有办法在Visual Studio 2008中折叠javascript或CSS - Is there a way to collapse javascript or CSS in Visual Studio 2008
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM