在NetBeans中为.less-files添加语法突出显示

时间:2023-01-13 18:14:59

I want to have files with a .less extension use the CSS syntax highlighting in NetBeans, and I don't have any clue how to do this.

我希望有.less扩展名的文件使用NetBeans中的CSS语法高亮显示,我不知道如何做到这一点。

I found a rather time consuming way to do this (http://netbeans.dzone.com/tips/quickstart-guide-language-supp), but it hit me that it must be easier way to do this.

我发现这是一个相当耗时的方法(http://netbeans.dzone.com/tips/quickstart-guide-language-supp),但它让我觉得它必须更容易实现。

Anyone knows?

有谁知道?

5 个解决方案

#1


11  

a module which adds full less highlighting support can be downloaded from the following page: http://plugins.netbeans.org/plugin/32782/lesscss-module

可以从以下页面下载增加完全不太突出显示支持的模块:http://plugins.netbeans.org/plugin/32782/lesscss-module

i tested the module with netbeans 7.0 and it worked flawless.

我用netbeans 7.0测试了模块,它运行完美无缺。

#2


23  

You just have to add a new file type in Netbeans > Tools > Options > Miscellaneous > Files. Note that Netbeans will mark as errors some less features like variables...etc

您只需在Netbeans>工具>选项>杂项>文件中添加新文件类型。请注意,Netbeans会将错误标记为较少的功能,如变量等

#3


6  

You might try out the new version of the plugin that was already mentioned:
http://plugins.netbeans.org/plugin/41315/lesscss-module

您可以试用已经提到过的新版插件:http://plugins.netbeans.org/plugin/41315/lesscss-module

Github repository, now gone, was available at:
https://github.com/khairie/lesscss-module

Github存储库现已消失,可从以下网址获取:https://github.com/khairie/lesscss-module

For me it seems to work quite fine despite some minor bugs in coloring. It is missing some features and e.g. does not offer automatic formatting, though.

对我来说,尽管着色方面存在一些小错误,但似乎工作得很好。缺少一些功能,例如但是,它不提供自动格式化。

Note that basic editing support for Sassy CSS and LESS CSS preprocessor files has been added to Netbeans dev build:
http://wiki.netbeans.org/NewAndNoteWorthy

请注意,对于Netbeans dev build,已添加对Sassy CSS和LESS CSS预处理器文件的基本编辑支持:http://wiki.netbeans.org/NewAndNoteWorthy

#4


3  

The SCSS Support plugin also works with less files, just need to add the "less" file extension with text/x-scss MIME in Tools/Options/Miscellaneous/Files.

SCSS支持插件也适用于较少的文件,只需要在工具/选项/杂项/文件中添加带文本/ x-scss MIME的“less”文件扩展名。

#5


1  

Since Netbeans 7.4 less is supported by Netbeans without the need for an additional plugin.

由于Netbeans支持Netbeans 7.4较少,而无需额外的插件。

For older version of Netbeans there are two plugins: http://plugins.netbeans.org/plugin/32782/lesscss-module and http://plugins.netbeans.org/plugin/41315/lesscss-module

对于旧版本的Netbeans,有两个插件:http://plugins.netbeans.org/plugin/32782/lesscss-module和http://plugins.netbeans.org/plugin/41315/lesscss-module

#1


11  

a module which adds full less highlighting support can be downloaded from the following page: http://plugins.netbeans.org/plugin/32782/lesscss-module

可以从以下页面下载增加完全不太突出显示支持的模块:http://plugins.netbeans.org/plugin/32782/lesscss-module

i tested the module with netbeans 7.0 and it worked flawless.

我用netbeans 7.0测试了模块,它运行完美无缺。

#2


23  

You just have to add a new file type in Netbeans > Tools > Options > Miscellaneous > Files. Note that Netbeans will mark as errors some less features like variables...etc

您只需在Netbeans>工具>选项>杂项>文件中添加新文件类型。请注意,Netbeans会将错误标记为较少的功能,如变量等

#3


6  

You might try out the new version of the plugin that was already mentioned:
http://plugins.netbeans.org/plugin/41315/lesscss-module

您可以试用已经提到过的新版插件:http://plugins.netbeans.org/plugin/41315/lesscss-module

Github repository, now gone, was available at:
https://github.com/khairie/lesscss-module

Github存储库现已消失,可从以下网址获取:https://github.com/khairie/lesscss-module

For me it seems to work quite fine despite some minor bugs in coloring. It is missing some features and e.g. does not offer automatic formatting, though.

对我来说,尽管着色方面存在一些小错误,但似乎工作得很好。缺少一些功能,例如但是,它不提供自动格式化。

Note that basic editing support for Sassy CSS and LESS CSS preprocessor files has been added to Netbeans dev build:
http://wiki.netbeans.org/NewAndNoteWorthy

请注意,对于Netbeans dev build,已添加对Sassy CSS和LESS CSS预处理器文件的基本编辑支持:http://wiki.netbeans.org/NewAndNoteWorthy

#4


3  

The SCSS Support plugin also works with less files, just need to add the "less" file extension with text/x-scss MIME in Tools/Options/Miscellaneous/Files.

SCSS支持插件也适用于较少的文件,只需要在工具/选项/杂项/文件中添加带文本/ x-scss MIME的“less”文件扩展名。

#5


1  

Since Netbeans 7.4 less is supported by Netbeans without the need for an additional plugin.

由于Netbeans支持Netbeans 7.4较少,而无需额外的插件。

For older version of Netbeans there are two plugins: http://plugins.netbeans.org/plugin/32782/lesscss-module and http://plugins.netbeans.org/plugin/41315/lesscss-module

对于旧版本的Netbeans,有两个插件:http://plugins.netbeans.org/plugin/32782/lesscss-module和http://plugins.netbeans.org/plugin/41315/lesscss-module