For writable buffers, is there a way to 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!
For writable buffers, is there a way to 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
.