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]