Monday, February 13, 2012

Re: multiple autocommands

On Mon, Feb 13, 2012 at 7:11 PM, Chris Lott <chris@chrislott.org> wrote:
> Is there a more efficient or better way to cluster together a set of
> autocommands in my .vimrc? For instance, I have the following:
>
> au BufNewFile,BufRead *.mtxt setlocal filetype=pandoc
> au BufNewFile,BufRead *.mtxt setlocal spell
> au BufNewFile,BufRead *.mtxt setlocal equalprg=pandoc\ -t\ markdown\
> --reference-links\ --no-wrap

You can group the setlocal definitions in one line. Example:
autocmd FileType python setl nosmartindent noautoindent
keywordprg=pydoc2 textwidth=79

Also, see :h augroup

--
Ivan Sichmann Freitas
GNU/Linux user #509059

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: