Hello,
I decided to make me a nice vimrc file. But I am stuck at two spots
and will appreciate any advice/tips on how to get these working.
1) Automatic retab (What I would like to do is to automatically retab
every file that I open). Initially, I had
if has("autocmd")
au BufReadPost * retab
endif
but this complained when I was opening unmodifiable buffers like
"help:retab". Then I changed this to
if &modifiable
if has("autocmd")
au BufReadPost * retab
endif
endif
but still executing "help:retab" complains about
Error detected while processing BufRead Auto commands for "*":
E21: Cannot make changes, 'modifiable' is off: retab
I am currently working around this by asking vimrc to retab only
specific types of files like *c, *cpp etc
2) I can reformat the entire document according to my formatoptions by
gggq<Shift+g>. Is there any way I can do this from vimrc instead of
manually typing n the command every time I open a file?
Thanks.
--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php