开发者

vim autoindent buffer on enter & exit

For writable buffers, is there a way to 开发者_Go百科tell vim to autoindent a file on entering & exiting the buffer?

What I want is the equiv of:

1G=G

to go first line
indent ..
until last line

Thanks!


You can use autocommands (:h :au), for example BufRead and maybe BufWritePre.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜