Reputation: 61
My snippets.cson file :
'source.css':
'Default':
'prefix':'dcss'
'body':"""
*
{
padding : 0;
margin : 0;
$1
}
"""
When I save this file, I get no error, but when I type "dcss" and hit tab. Nothing seems to appear.
I've read through this;
https://github.com/atom/atom/issues/1867
and implemented it as well it still doesn't seem to work
I am running Atom in safe mode so that the init script doesn't interfere.
Thanks in Advance.
Upvotes: 1
Views: 105
Reputation: 12882
There are two mistakes in your snippet:
Syntax scopes in Atom are prefixes with a dot, so your prefix should be .source.css
CSON is sensitive on indentation, so you need to make sure it's consistent (the closing """
aren't indented correctly).
Put together, your snippet should look like this:
'.source.css':
'Default':
'prefix': 'dcss'
'body':"""
*
{
padding : 0;
margin : 0;
$1
}
"""
Upvotes: 1