0

i am quite new to ST. I created this css snippet now i want it to be universal, i mean to work just about anywhere and not just css file. and now it works fine on html but on css the when i type and press tab it sows this border-left property. i have emmet installed but it shoudnt conflict because b prefix is added. have a look at the snippet

    <snippet>
    <content><![CDATA[

        #${1:this}{
  margin: auto;
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
}

]]></content>
    <!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
    <tabTrigger>bcen</tabTrigger>
    <!-- Optional: Set a scope to limit where the snippet will trigger -->
    <!-- <scope>source.python</scope> -->
</snippet>
1
  • hi @MarcAndre! what do you mean you want it to work just about anywhere? Commented Dec 22, 2013 at 18:09

1 Answer 1

1

When I open a fresh CSS document and type bcen I get

border-length: ;

so it must already be an Emmet shortcut. The easiest option would be for you to change the <tabTrigger> of your shortcut to something that Emmet doesn't use. There are other options, like setting "disable_tab_abbreviations": true in your Emmet settings, but that would disable everything, which I don't think you want to do.

Since you don't have a <scope> set for your snippet, it should work everywhere, for every language.

Sign up to request clarification or add additional context in comments.

2 Comments

Yeah but as far as i know, there is no BCEN for emmet. so why it's clashing?
@MarcAndre Based on MattDMo answer, it does expand in Emmet, so some entry does exist for it. It's also possible that it's a bug in Emmet. Perhaps file a bug on the project. It could also just have to do with how Emmet is implemented. If it simply runs a command based on tab, even if nothing "existed" for the expansion, it still wouldn't fall back to the snippet as the Emmet command was already run.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.