Sublime Forum

Html.erb angle brackets autocomplete

#1

I’m trying st2 for the first time coming from textmate (newbie there too :stuck_out_tongue:) and there is something I cannot do:
In TM using the HTML(rails) syntax I can autocomplete command bracket if I type <% I get the other side %> in automatic.
The syntax file seems to be the same of TM, any way to do that?

0 Likes

#2

wondering the same

0 Likes

#3

Create a new snippet:

‘Tools’ > ‘New snippett’ will open a new file. Overwrite the default text with something like this…

]]> % ERB Tag source.erb

Typing %-tab will insert <% %> with the cursor in the erb. Add %= and %- for other erb tags.

Save the file in the erb package or in your Application Support/SublimeText/Packages/User folder with the extension .sublime-snippet

0 Likes