Aptana Studio 3 (.less) 的高级自定义语法着色 [英] Advanced Custom Syntax Coloring for Aptana Studio 3 (.less)

查看:23
本文介绍了Aptana Studio 3 (.less) 的高级自定义语法着色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为 Aptana Studio 3 添加 .less 的语法突出显示.我找到了 XText,但它似乎只适用于 Eclipse.Apatana 似乎没有在他们的论坛上提供太多关于如何执行此操作的线索,那么是否有人有任何创建自定义语法突出显示的经验或知道包含 .less 语法检测和突出显示的解决方案?

I would like to add syntax highlighting for .less for Aptana Studio 3. I found XText but it only seems to work with Eclipse. Apatana doesn't seem to give too many leads into how to do this on their forums, so does anyone have any experience working with creating custom syntax highlighting or know of a solution for including .less syntax detection and highlighting already?

推荐答案

如果您只想突出显示语法,您可以让 Aptana 将 .less 文件视为 .css 文件.

If you just want syntax highlighting, you could get Aptana to treat .less files as .css files.

为此,打开 Aptana 首选项窗口并找到文件关联选项卡.您可以通过在搜索/过滤器栏中键入文件关联"来执行此操作,选择常规 > 编辑器下列出的选项.

To do this, open the Aptana preferences window and find the File Associations tab. You can do this by typing 'File Associations' into the search/filter bar, choose the opption listed under General > Editors.

从这里,您可以添加新的文件类型,为其指定类型:'*.less'.这将添加文件类型并可能添加一些默认的关联编辑器.

From here, you can add a new file type, giving it the type: '*.less'. This will add the file type and may add some default associated editors.

单击添加..."以添加新的关联编辑器,选择CSS 源代码编辑器"选项.当您按 OK 时,它应该被添加到列表中并被选中,单击 Default 将其带到列表顶部.

Click on Add... to add a new associated editor, choosing the 'CSS Source Editor' option. When you press OK, it should be added to the list and be selected, click on Default to take it to the top of the list.

现在,当您在 Aptana 中打开一个 .less 文件时,您将拥有 CSS 语法突出显示和自动完成功能.

Now, when you open a .less file in Aptana, you'll have CSS syntax highlighting and autocomplete.

这篇关于Aptana Studio 3 (.less) 的高级自定义语法着色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆