On 26, اگست 2012, at 13:46, Marc Weber <marco-oweber@gmx.de> wrote:
> way 1: built your own commands using exec and string concatenation
> 
> let common="autocmd filetype python"
> exec common.' setlocal expandtab ..'
> 
> (or create your own command)
> 
> way 2: using line continuation:
> 
> autocmd filetype python setlocal expandtab shiftwidth=4 tabstop=4 softtabstop=4
>  \ | setlocal textwidth=78
>  \ | match ErrorMsg '\%>80v.\+'
> .. 
> 
> way 3: Don't use your .vimrc, use a ~/.vim/ftplugin/python.vim file
> 
> way 4: Don't use your .vmirc, use a "custom git repostiory" and install it via VAM :)
> 
> even shorter? Maybe you can binary encode them, gunzip them and .. (you don't want this)
> even hsorter? Download from a server each time (you don't want this)
> 
> Marc Weber
You could, rather than using a bunch of auto commands, use one and call a custom function in there that does all of your settings. This will have the advantage of not cluttering up your auto command set with a bunch of one line events as well as letting you add more things easily. 
Of course, the ftplugin method is preferred. 
-- 
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
Sunday, August 26, 2012
Subscribe to:
Post Comments (Atom)
 
No comments:
Post a Comment