CSS 如何在 Notepad++ 中为 Less 添加语法高亮?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4913834/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do you add syntax highlighting for Less in Notepad++?
提问by Mattias Alfborger
I want Notepad++ to treat my .lessfiles just as my .cssfiles and thereby get syntax highlighting for any .less
files I open.
我希望 Notepad++ 将我的.less文件视为我的.css文件,从而为.less
我打开的任何文件突出显示语法。
回答by kapex
To get LESS syntax highlighting, you have to download and import a user defined languagefile. Here are some links to language files:
要获得 LESS 语法突出显示,您必须下载并导入用户定义的语言文件。以下是一些语言文件的链接:
- LESS language file, as listed in the Notepad++ User Defined Language List
- LESS language file on GitHub
Installation instructions from the GitHub repository:
来自GitHub 存储库的安装说明:
- Download the
less.xml
file- Open Notepad++
- Go to
Language -> Define your language...
, click onImport...
and select theless.xml
file you've downloaded- Close and restart Notepad++
- Done
- 下载
less.xml
文件- 打开记事本++
- 转到
Language -> Define your language...
,单击Import...
并选择less.xml
您下载的文件- 关闭并重新启动记事本++
- 完毕
Another way to install language files is to copy them into a file in the Notepad++ installation directory.
另一种安装语言文件的方法是将它们复制到 Notepad++ 安装目录中的一个文件中。