Monday, September 8, 2014

Re: Keep Vim light and clean

Another solution I use is to setup a different set of plugins
depending of the use.

I other words keeping a separate set of settings and plugins
depending what you have to do.

I have a different setup for c++, python, and email writing.

To do so it is enough to start a vimrc with this lines:
------------- 8<
set nocompatible
let &runtimepath = printf('%s/vimfiles,%s,%s/vimfiles/after', $VIM,
$VIMRUNTIME, $VIM)
let s:portable = expand('<sfile>:p:h')
let &runtimepath = printf('%s/vim,%s,%s/vim/after', s:portable,
&runtimepath, s:portable)
>8 -------------
This allows vim to ignore the systemwide configuration and
only use the directory where this vimrc resides.

Assuming this vimrc is in ~/.vim/cpp/ you put the plugins in
~/.vim/cpp/vim

and start vim with
$ vim -u ~/.vim/cpp/vimrc

I my case I made an alias:
alias 'vcpp'='vim -u ~/.vim/vcpp/vimrc'

this way I can setup vim for the specific uses without worry to
bother each other configuration.



On Mon, Sep 8, 2014 at 12:04 AM, Marc Weber <marco-oweber@gmx.de> wrote:
> vim-addon-manager and NeoBundle allow to load plugins as needed.
> There are older "AsNeeded" solutions, too
>
> See samples in the README files of those projects
>
> Marc Weber
>
> --
> --
> 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
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: