Sublime colorize:haml中的javascript块 [英] Sublime colorize :javascript block in haml
问题描述
我有2/3的崇高,并且:javascript块内的colorize无效。
I have sublime 2/3 and the colorize inside a :javascript block doesn't work fine.
包是这个https://sublime.wbond.net/packages/Haml
实际上他们说:现在可以正确识别Ruby,ERB,Javascript,Sass和CSS过滤器中的文本,以便获得所有语法高亮,片段,命令等。但是在sublime中它不起作用。
Actually they says that: "Text inside Ruby, ERB, Javascript, Sass, and CSS filters are now properly recognized so you get all the syntax highlighting, snippets, commands, etc." but in sublime it doesn't work.
推荐答案
对我来说,sublime 3,随Rails包一起安装。这也提供了Ruby Haml。如果按 ctrl + alt + p
并键入 haml
,您可能会看到两个 Set语法:Ruby Haml
。
For me, sublime 3, comes installed with Rails package. This also provide "Ruby Haml". If you press ctrl + alt + p
and type haml
you will probably see two Set Syntax: Ruby Haml
.
对我来说最好的解决方案是安装 ApplySyntax
并在它的用户设置添加以下内容:
The best solution for me was also install ApplySyntax
and in it's user settings add the following:
// Put your custom syntax rules here:
"syntaxes": [
{
"name": "Haml/Syntaxes/Ruby Haml",
"extensions": ["haml"],
"rules": [
{"file_name": ".*\\.haml$"}
]
}
]
这篇关于Sublime colorize:haml中的javascript块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!