有没有办法在Visual Studio 2008中折叠javascript或CSS

时间:2022-05-09 05:08:41

It would be nice to have the ability to create 'regions' in js and css files. Much easier to work with. I couldn't find anything on Google about this, but even Dreamweaver can do this.

能够在js和css文件中创建“区域”会很高兴。更容易使用。我在Google上找不到任何关于此的内容,但即使Dreamweaver也能做到这一点。

thanks!

2 个解决方案

#1


you can select the block you want to hide and do CTRL+M,H (Edit --> Outlining --> Hide Selection) With enough time someone could write a macro or adding to identify all functions or objects and outline them all separately.

您可以选择要隐藏的块并执行CTRL + M,H(编辑 - >大纲 - >隐藏选择)有足够的时间有人可以编写宏或添加以识别所有功能或对象并将它们全部分开。

#2


From what I can tell after a little bit of research, there's no native support in VS2008 for collapsible "#regions" in JavaScript or CSS files... however, this blog post describes a workaround for JavaScript (and it looks like the example could be extended for use with CSS files as well).

通过一些研究后我可以看出,在VS2008中,JavaScript或CSS文件中的可折叠“#regions”没有原生支持......但是,这篇博文描述了JavaScript的解决方法(看起来这个例子可能是扩展用于CSS文件)。

#1


you can select the block you want to hide and do CTRL+M,H (Edit --> Outlining --> Hide Selection) With enough time someone could write a macro or adding to identify all functions or objects and outline them all separately.

您可以选择要隐藏的块并执行CTRL + M,H(编辑 - >大纲 - >隐藏选择)有足够的时间有人可以编写宏或添加以识别所有功能或对象并将它们全部分开。

#2


From what I can tell after a little bit of research, there's no native support in VS2008 for collapsible "#regions" in JavaScript or CSS files... however, this blog post describes a workaround for JavaScript (and it looks like the example could be extended for use with CSS files as well).

通过一些研究后我可以看出,在VS2008中,JavaScript或CSS文件中的可折叠“#regions”没有原生支持......但是,这篇博文描述了JavaScript的解决方法(看起来这个例子可能是扩展用于CSS文件)。