On Feb 6, 2:25 pm, Girish Venkatasubramanian <[email protected]>
wrote:
> 1) Automatic retab ...

> if &modifiable
>   if has("autocmd")
>       au BufReadPost * retab
>   endif
> endif
>
> but still executing "help:retab" complains...

You're testing modifiable at start up, you want to test it when the
auto command fires.  Perhaps something like

  if has("autocmd")
    au BufReadPost * if &modifiable | retab | endif
  endif

BTW, it's a good idea to put auto commands in a group.  See :help
autocmd-groups

> 2) I can reformat the entire document according to my formatoptions by
> gggq<Shift+g>.

Try the normal command, it lets you do what you would type:

  normal gggqG

in vim script is exactly like typing that in normal mode, hence its
name.

Regards, John

-- 
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Reply via email to