Expand symbol-triggered snippet after symbol


#1

I’m having trouble making a snipped that is triggered with the “equal” character expand after the closing of an HTML tag.

My full snippets.cson looks like this:

'.text.html.erb':
  'ERB puts':
    prefix: '='
    body: '<%= $1 %>'

The issue is it won’t expand after any character in this range /[></#"']/ and probably more I haven’t tested. I’m just trying to have my snippet expand within html tags:

<h2>=(caret positioned here)(tab)</h2>

Any ideas on how to get around this? Is it maybe related to https://github.com/atom/snippets/issues/12 ?

Thanks for your help!


#2

No, it isn’t related to the issue you cite …

When you have the caret in the position you mention and you press Shift+Alt+S, does your snippet show up in the list?

Also, could you give the following information?

  • Which version of Atom are you using?
  • What OS and version are you running?
  • Do you have the Emmet package installed?
  • Can you reproduce the issue after completely exiting Atom and restarting using atom --safe?

#3

I also have the same problem. So annoying. Does anyone know how to solve this problem?

I’m pressing TAB key and nothing happens (only when I try to use snippets after symbols like “<>”). But works after letters and numbers.

  • Atom version 0.209.0
  • OS X 10.10.3
  • No Emmet
  • Reproduces with --safe

#4

Sorry for the delay, the snippet does not show up in the snippet list.

  • 1.0.0
  • OSX 10.10.3
  • No Emmet installed
  • Same problem with atom --safe