Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Collisions with ERB Snippets in Sublime Text 2 #304

adeluccar opened this Issue · 6 comments

3 participants


If both Emmet and ERB snippets are active in Sublime Text 2 then writing er + Tab results in <er></er> instead of the intended behavior which is <% %>. ERB is an expansion plugin for common embedded ruby tags.

Is there some way of fixing this behavior in order to use both plugins?


Fixed. Add this to your User Preferences settings file.

"disabled_single_snippet_for_scopes": "text.html, er, pe, pc, if, ife, else, elsif, end, lt"

@adeluccar adeluccar closed this

You did it wrong: "disabled_single_snippet_for_scopes" affects only scopes, not abbreviations.
In my editor, er abbreviation works just fine, you have to make sure that your document syntax is set to HTML (Ruby)


Thank you for your reply sergeche. :)
What if syntax is set to HTML (Rails)? Typical use case would be editing of erb files when working with rails apps.
What would the correct User Preference setting be? I don't want emmet to expand these keywords "er, pe, pc, if, ife, else, elsif, end, lt".


@adeluccar it depends on current syntax scope, you can see it in status bar when you hit Ctrl+Shift+P (Mac) or Ctrl+Alt+Shift+P (PC). For default HTML (Ruby) it’s a text.html.ruby which is perfectly matches default disabled_single_snippet_for_scopes option value.

If you changed this option or use custom bundle for ERB coloring or if still fails to properly expand er snippet, you should check syntax scope value in current caret position and add it to disabled_single_snippet_for_scopes.


Ok. I deleted the disabled_single_snippet_for_scopes setting.
Entered an erb file and it worked correctly.
I wonder what the actual issue was?
Again, thanks! :octocat:


I cant understand what you guys have concluded. Same issue here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.