1
如何将vim设置应用于erb文件?像erb文件中的vim设置
/* tabstop=4 shiftwidth=4 foldmethod=indent */
好像
<% # xxx %>
# xxxx
<!-- xxx -->
没有工作
如何将vim设置应用于erb文件?像erb文件中的vim设置
/* tabstop=4 shiftwidth=4 foldmethod=indent */
好像
<% # xxx %>
# xxxx
<!-- xxx -->
没有工作
这应该工作(把它放在接近文件的顶部):
<!-- vim: tabstop=4 shiftwidth=4 foldmethod=indent
-->
你只是缺少vim:
modeline前缀。来自:h modeline
。
模式线有两种形式。第一种形式:
[text]{white}{vi:|vim:|ex:}[white]{options}
第二种形式(和Vi的一些版本兼容):
[text]{white}{vi:|vim:|ex:}[white]se[t] {options}:[text]