我正在尝试 Less Css,并且使用的是 Visual Studio 2010。
如果编辑器提供对语法的支持,那就太好了突出显示和智能感知更少,例如着色和建议变量。我有什么选择可以让它发挥作用?我是否需要为其编写一个插件,或者如何将其添加到 VS 中?已经有这样的东西存在了吗?
I am experimenting with Less Css, and I am using Visual Studio 2010.
It would be nice if the editor provided support for syntax highlighting and Intellisense for Less, for instance coloring and suggesting variables. What are my options to get that to work ? Do I need to write a plugin for it, or how would one go about adding this to VS ? Does anything exist for this already ?
发布评论
评论(4)
如果您使用的是 Visual Studio 2012,则可以使用 Web Essentials 2012。它使用类似于 Visual Studio 的 CSS 语法突出显示的语法突出显示。它在保存时编译为 CSS。
更新
If you are using Visual Studio 2012 you can use Web Essentials 2012. It uses syntax highlighting similar to Visual Studio's CSS syntax highlighter. It compiles to CSS on save.
Update
http://www.mindscapehq.com/products/web-workbench
更新(2012 年 3 月 7 日)
使用此软件大约一周后,我已将其卸载,原因是:
http://www.mindscapehq.com/products/web-workbench
Update (07 Mar 2012)
After a week or so of using this, I have uninstalled it due to:
这个扩展似乎更好: LessExtension
这是作者描述:
这对我来说效果很好。
This extension seems better : LessExtension
Here is the author description :
And it work nice for me.
除了 Visual Studio Gallery(截至 2010 年 5 月 2 日)上找不到任何一个href="http://visualstudiogallery.msdn.microsoft.com/en-us/dd5635b0-3c70-484f-abcb-cbdcabaa9923" rel="noreferrer">CSS Is Less,它只连接内置的在 CSS 语言服务中。
如果您想学习如何自己编写,可以首先查看 Ook 语言集成示例。在该示例中实现扩展点(分类、快速信息源、补全源)将为您提供所需的功能(语法突出显示、悬停提示、智能感知补全)。
I can't find one on the Visual Studio Gallery (as of 5/2/10) besides CSS Is Less, which only hooks up the built-in CSS language service.
If you want to learn how to write one yourself, you can start by looking at the Ook Language Integration sample. Implementing the extension points in that sample (classification, quick info source, completion source) will give you the features you asked for (syntax highlighting, hover tips, intellisense completion).