自动完成SASS缺少分号在Sublime文本? [英] Autocomplete with SASS missing semicolon on Sublime Text?
问题描述
我刚刚开始使用SASS with Sublime Text 2,真的很喜欢它。但是,一些与CSS一起使用的自动完成功能不适用于SASS。
例如,在一个CSS文件中,当我键入 float
并按 tab
分号
float:
然后我添加 left
并按Tab键,我得到
float:left; code>
但是,它不会在SCSS文件中这样做。有没有办法获得这个自动完成回来,但与SASS?
修正: https://github.com/sergeche/emmet-sublime/issues/70
对于SASS语法,默认方言是sass,不是scss(这很重要)。
根据 http://sass-lang.com 的示例,关闭分号不是
。但是你可以改变这种行为:在用户的Emmet.sublime-settings
文件中,为首选项部分添加sass.propertyEnd属性,如
这样:
<
{
preferences:{
sass.propertyEnd :;
}
}
I've just started using SASS with Sublime Text 2 and really enjoying it. However, some of the autocomplete features that worked with CSS, do not work with SASS.
For example, on a CSS file when I type: float
and press tab
, it automatically adds a semicolon
float:
And the same if I then add left
and press tab, I get
float:left;
However, it does not do this in a SCSS file. Is there a way to get this autocomplete back, but with SASS?
Fixed: https://github.com/sergeche/emmet-sublime/issues/70
For SASS syntax, default dialect is sass, not scss (it’s important). According to examples from http://sass-lang.com, closing semicolon is not required.
But you can alter this behaviour: in User’s Emmet.sublime-settings file, add the sass.propertyEnd property for preferences section, like this:
{
"preferences": {
"sass.propertyEnd": ";"
}
}
这篇关于自动完成SASS缺少分号在Sublime文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!