Autocomplete with SASS missing semicolon on Sublime Text?

百般思念 提交于 2019-12-22 04:29:22

问题


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?


回答1:


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": ";"
    }
}


来源:https://stackoverflow.com/questions/21953759/autocomplete-with-sass-missing-semicolon-on-sublime-text

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!