0

I use the SublimeText3. I have installed the ERB Snippet package to have ability to use if, if-else, end, etc snippets into html.erb files. But into ST3 when I try to open foo.html.erb file it always is opened with ERB, not HTML(Rails) view. By default ERB Snippet works only into text.html.ruby scope, so to make it run I need for each opened html.erb file to use 'Open all with current extension', which is annoying.

So the questions are:

  1. Is it possible to figure out ST3 to open html.erb with HTML(Rails) view instead of ERB?
  2. Or is it possible to figure out ERB Snippets to work with ERB scope?
Ivan Rostovsky
  • 614
  • 1
  • 8
  • 16
  • Not yet, because this issue is related with double file extension, i.e. html.erb, not just erb. As I found, this double extension is not correctly supported now into ST3. – Ivan Rostovsky Apr 05 '18 at 21:05
  • that is covered under [this answer](https://stackoverflow.com/a/12901082/2348587) on that question. Someone asked it as a [top level question](https://stackoverflow.com/questions/49495487/double-filetype-extension-correct-syntax-highlighting-in-sublime-text-3) last week as well because he felt that answer was buried. – Darrick Herwehe Apr 06 '18 at 00:07
  • possible duplicate of [Double Filetype Extension: Correct Syntax Highlighting in Sublime Text 3](https://stackoverflow.com/questions/49495487/double-filetype-extension-correct-syntax-highlighting-in-sublime-text-3) – Darrick Herwehe Apr 06 '18 at 12:19

1 Answers1

-1

I found the dirty solution. I just edited scope into all ERB Snippets(~/Library/Application Support/Sublime Text 3/Packages/ERB Snippets) from text.html.ruby to text.html.erb. So now the html.erb is still opened with ERB view but snippets work.

Ivan Rostovsky
  • 614
  • 1
  • 8
  • 16