[Solved] Can't get this snippet for text.plain working


I’m trying to get an snippet for use it in .gitignore files. The (pretty basic) snippet is:

  'Default .gitignore file':
    'prefix': 'wgignore'
    'body': '''

I don’t see anything wrong on it, but I can’t get it working. And I guess a gitignore file is text.plain, right?
The language-text package says the scope for plain text is text.plain, so, I don’t know what I’m doing wrong.
Can someone enlighten me, please?


It works as expected here on Atom 1.0.19 and OS X 10.9.5. Does it work if you run Atom in safe mode?


If you have the language-generic-config package of @leedohm installed then the scope for gitignore file if .text.generic-config. That may be the reason.


That wasn’t the case, but thanks for the answer :D.
I don’t know what happened, but it works now, @john. (Well, it still don’t show a tooltip suggesting an autocomplete for that snippets, like in other cases does, but, at least, it works).
Well: I just updated the Linter package, but I doubt that would be the reason.

BTW, just for knowing about it: how can I run atom in safe mode?
I don’t find the option in the menu, Atom doesn’t appear to have manpages.
The search of Documentation says No guide results for safe :(. I’m clueless.

Again: thanks to both of you :).

Edit: Oh. Atom 1.0.19 and GNU/Linux kernel 4.2.2-1. I forget to said that. Archlinux up to date.


You can start Atom in safe mode by running it from the command line with the --safe option, like so:
atom --safe


I’m having the same issue. I’ve added a gitignore snippet, but it’s not auto suggested like snippets usually are. It does show up in the Snippets: Available menu.
I’ve added my snippet under two selectors.
I’ve started atom in safe mode.

  'Git ignores':
    'prefix': 'gitignore'
    'body': """
  'Git ignores':
    'prefix': 'gitignore'
    'body': """

Why wouldn’t this snippet be auto suggested?


Yeah, you’re right: I have the same problem. It doesn’t bother me as much as the already commented one, but it’s still annoying.


Interestingly, if you look at the snippets in the language-text package, the scope is not .text.plain but *:

Have you tried that instead?


That obviously, work. But it doesn’t works because you give it the properly scope, but because you tell it to work in all scopes :þ. In any case, it’s a solution :D.


It’s possible that there is a bug in the snippets engine that doesn’t properly recognize the plain text scope … and it has lasted this long because there aren’t typically plain text exclusive snippets.


Thanks for the * tip, I’ll try that. I opened an issue in the Atom snippets package: