Snippet works, but shortcut never seems to


I have a snippet block in my snippets.cson:

  'Scss Linter Disable':
    'prefix': 'sld'
    'body': '// scss-lint:disable'
  'SVG data url':
    'prefix': 'svgu'
    'body': 'data:image/svg+xml;base64,$1'
  'At Breakpoint':
    'prefix': 'abp'
    'body':   """
      @include breakpoint(${1:screen-xs}) {

If I invoke the “snippets” command, Shift-Option-S, I see all the sinppets, and if nivoed from the menu they work perfectly.

However, if I try to use the prefix, as in abp tab one of the built-in commands or emmet commands fire instead

How do I get around this?


Is the indentation above what you have in the actual file? Shouldn’t all of the snippets be a deeper indentation than the .source.css line?


they are, sorry. hard to paste code here. as I said, code works, snippet inserted and tab stops work. It’s just the prefix.


It’s much easier to paste code if you use the fenced code blocks I mention here:

I went ahead and edited your post for clarity. I hope you don’t mind :grinning:


Thank you. I did not you could do that here.


You’re welcome :grinning:

As to your problem, could you post the entire snippet.cson as a Gist and link to it here? Perhaps there are other problems that we could see?


Here you are:


I just replaced my snippets.cson with yours and abp worked as expected in a blank CSS file. I’m using Atom v1.3.0-dev-c83dae9 on Mac OS X 10.11.1. Which version of Atom and what OS are you running?


It’s an SCSS file, not CSS, so there was strike one. I changed it to source.sass (which seems to be the language name)

Still nothing. This is Atom 1.1.0, OS 10.11.2 Beta (15C31f)


Also, where do you get 1.3 dev? Even when I used the beta it always says it’s 1.10 (beta) and the release notes never change:


To get v1.3.0-dev, I build Atom from source.

And I figured out what the problem is. SCSS is not .source.sass. SCSS is .source.css.scss:

You can find this in the language package description.


Missed that, it was a scroll-down fail. Still that means source.css snippets should work for both css and scss, right?

Anyway, they all show up on the menu…

Just without their defined shortcuts.

Here’s the keyword watcher thing, it’s not even on the list, much less first…


Actually, I’m not sure that the snippets work via CSS selectors … I think it just works based on an exact match. At least, that’s the behavior I’m seeing. When I changed the snippets to .source.css.scss they worked.