简体   繁体   中英

Sublime Text snippet doesn't work in .scss files

I have the following saved in ~/Library/Application Support/Sublime Text 3/Packages/User as sass_mq.sublime-snippet :

<snippet>
    <content><![CDATA[
    @include respond-min() {}
]]></content>
    <!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
    <tabTrigger>mq</tabTrigger>
    <!-- Optional: Set a scope to limit where the snippet will trigger -->
    <scope>source.sass</scope>
</snippet>

I got source.sass by pressing cmd + opt + p and looking at the status bar.

It works in all other file types if I remove the scope, but never in .scss files.

Is my syntax wrong?

<scope>source.sass</scope>

You have the scope limited to sass files.

I think you have to include both sass and scss in the scope. Try using this line, instead.

<scope>source.scss, source.sass</scope>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM