views:

94

answers:

2

how can i apply vim settings to erb file?? like

/* tabstop=4 shiftwidth=4 foldmethod=indent */

seems like

<% # xxx %>
# xxxx
<!-- xxx -->

didn't work

A: 

This should work (put it close to the top of the file):

<!-- vim: tabstop=4 shiftwidth=4 foldmethod=indent
-->
sth
+1  A: 

You're just missing the vim: modeline prefix. From :h modeline.

There are two forms of modelines. The first form:

[text]{white}{vi:|vim:|ex:}[white]{options}

The second form (compatible with some versions of Vi):

[text]{white}{vi:|vim:|ex:}[white]se[t] {options}:[text]
zen