开发者

vim autoindent buffer on enter & exit

开发者 https://www.devze.com 2022-12-23 02:26 出处:网络
For writable buffers, is there a way to 开发者_Go百科tell vim to autoindent a file on entering & exiting the buffer?

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

精彩评论

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