用 snippets 实现,比如输入%,再按 tab 补全成<% %> 输入=补全成 <%= %> https://github.com/asux/snipmate-snippets/tree/master/eruby https://github.com/asux/snipmate-snippets/blob/master/eruby/%25.snippet
# Rails *****************************
6 snippet rc
7 <% ${1} %>
8 snippet rce
9 <%= ${1} %>${2}
10 snippet end
11 <% end %>${1}
12 snippet ead
13 <% ${1}.each do |${2}| %>
14 ${3}
15 <% end %>
16 snippet for
17 <% for ${2:item} in ${1} %>
18 ${3}
19 <% end %>