Snippets not working on windows 7


#1

Hi, I have installed atom at home on windows and used snippets from the same file that works for me on Fedora. I had to troubleshoot tabs and spaces before, and more reason to believe it isn’t an error in my snips is that i tried using ONLY the default snippet, and this doesnt work- with 2 spaces for each indent:

      'Snippet Name':
         'prefix': 'hello'
	 'body': 'Hello World!'```

this does not work. changing spaces to tabs does not work either, I have invisibles on

Thank you

<img src="/uploads/github_atom/original/3X/2/1/21008ca1ac5bba3602674560554755356808af40.PNG" width="308" height="132">

ANSWER:
I don't understand the logic behind it, but uninstalling/reinstalling atom did the trick

#2

One can’t really tell if your indentation is working from what you’ve posted there.
Any chance you can wrap it in triple backticks, which would look like this:

'.source.js':
  'console.log':
    'prefix': 'log'
    'body': 'console.log(${1:"crash"});$2'

Edit: your indentations should roughly look like this:


#3

Another thing, you should probably replace “Snippet Name” with an actual name for your snippet.
I’m not sure if spaces matter in the name?


#4

The triple backticks didn’t change the spacing in here, so I uploaded a pic


#5

The triple backticks are supposed to be around the whole thing, not for each line. Then you preserve the formatting.

But yea that looks like it should work.
Do you have any packages installed (e.g. Emmet) that may interfere with snippets? If you try running them from atom in safe mode (atom --safe), what happens?


#6

As far as the triple-backticks go, see the Code Blocks section in this FAQ entry:


#7

Using safe mode didn’t change anything. I didn’t install anything yet, I just downloaded it and started using it. Maybe it doesn’t work on Ubuntu