自动完成SASS缺少分号在Sublime文本? [英] Autocomplete with SASS missing semicolon on Sublime Text?

查看:153
本文介绍了自动完成SASS缺少分号在Sublime文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始使用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 的示例,关闭分号不是
文件中,为首选项部分添加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屋!

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