Autocomplete with SASS missing semicolon on Sublim

2019-04-23 00:53发布

问题:

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