Home Download Buy Blog Forum Support

html.erb angle brackets autocomplete

html.erb angle brackets autocomplete

Postby lucac81 on Tue Jan 17, 2012 6:31 pm

I'm trying st2 for the first time coming from textmate (newbie there too :P) 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?
Posts: 1
Joined: Tue Jan 17, 2012 6:27 pm

Re: html.erb angle brackets autocomplete

Postby rweng on Tue Feb 07, 2012 10:46 am

wondering the same
Posts: 1
Joined: Sat Feb 04, 2012 2:43 pm

Re: html.erb angle brackets autocomplete

Postby lordmagnum on Wed Feb 15, 2012 12:52 am

Create a new snippet:

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

<% $1 %>
<description>ERB Tag</description>

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
Posts: 2
Joined: Wed Feb 15, 2012 12:37 am

Return to Technical Support

Who is online

Users browsing this forum: No registered users and 15 guests