1

In a js file, I can type comm and autocomplete will kick in prompting me for comment blocks. This functionality doesn't work in CSS files.

I thought this would be the answer for me but it is not.

"auto_complete_selector": "source, text"

This post also looked promising, but it was not either. Sublime Text 2 code snippet not working in proper scope

Anyone know of a way to add it or to turn it on for CSS?

1
  • Here is a video of what I'm referring to: youtu.be/c7ZQ_AhfEIw Commented Mar 24, 2014 at 5:43

1 Answer 1

0

You need to add a snippet that whos scope has CSS files included. Example:

<snippet>
    <content><![CDATA[
/* ----------------------------------------------------------------------------
 * ${1:CSS Section}
 * ------------------------------------------------------------------------- */
]]></content>
    <!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
    <tabTrigger>comm</tabTrigger>
    <!-- Optional: Set a scope to limit where the snippet will trigger -->
    <scope>source.css</scope>
</snippet>

Save this file with the .sublime-snippet extension in your User packages folder (Sublime Text -> Preferences -> Browse Packages) and you will be good to go.

In a CSS file, you would then type "comm" and hit tab.

NOTE: The folder location I mention above is for Mac users FYI

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

Comments

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.