Closed haitaoxu closed 10 years ago
I needed to make sure my syntax was correct. By default, my setup was using Ruby and wasn't picking up on erb stuff. Unfortunately, there is not a way to do this from the command palette yet.
Click on the syntax in the bottom left corner and select the Rails syntax.
@ScottRadcliff Thx, But there is another question working with emmet plugin, In the erb file, I use the HTML(Rails) syntax. When I input 'if' and key up 'tab' key, It expect "<%if conditons %>", but in fact it shows "
May be I should report this to emmet developer ?
Yep. I think your issue is in the wrong place.
@ScottRadcliff Every time I open a ruby or erb files I have to change to Rails syntax manually? Should not this be done automatically?
@toctan I totally agree. For now, I am using Shift-Ctrl-L
.
You might have better luck posting bugs/concerns on the feedback site http://discuss.atom.io/
Yeah some of the commands are working for me, ex, - + tab will insert <% %> as expected but "if" tab is also not working for me. I checked to make sure it was picking up my erb file as html (Ruby- ERB), but it still doesn't seem to work.
This seems to happen because the "Language Ruby" package also has grammar for the html.erb file type. As a temp fix you can edit the Language Ruby package (Preferences > Language Ruby > Open in Atom) and in grammars either remove the file html(ruby - erb).json or edit it.
Hopefully they'll provide a solution soon though..
For reference: atom/atom#1831
We need to add the ability to match on directory structure to Atom grammars so that Rails is treated as more specific than Ruby. If anyone is interested in helping out with that, that would be awesome.
I moved the issue mentioned above to https://github.com/atom/first-mate/issues/17 and provided a bit of guidance as to how someone could help us fix this.
I closed this because it looks like it was moved to first-mate
@amnwebmaster
Hi, I cannot found Open in Atom
In Atom 1.0.5
@amnwebmaster
Like @TangMonk said, I can't Open in Atom anymore. Any ideas?
In the .erb file, I input "if" and then click 'tab' button, but it's not change to "<% if xxx %>"