Monday, June 14, 2010

Re: Advice for easily switching ~/.vim?

On 06/14/2010 12:40 PM, Nathan Neff wrote:
> Hello,
>
> Does anyone have a quick way to open Vim with a bare-bones
> ~/.vim directory and ~/.vimrc, etc?
>
> I'm developing a plugin, and before I publish a new version
> of the plugin, I like to test the plugin using a bare-bones
> ~./vimrc with my plugin installed.
>
> Currently, I use a shell-script to switch symlinks. For example, I have
> two directories:
>
> ~/bare_vim_settings (this dir has nothing but my plugin in it)
> ~/real_vim_settings (this dir has all my settings/plugins in it)
>
> I just run a script that links ~/.vim to ~/bare_vim_settings
> and ~/.vimrc to ~/bare_vim_settings/bare_vimrc
>
> The disadvantage of this is that when my ~/.vim directory is pointing
> to ~/bare_vim_settings, I'm stuck using Vim with bare settings.
>
> Is there a way to run vim like this:
>
> vim --settings-directory ~/bare_vim_settings
>
> this would create one instance of Vim with the bare settings, and any
> other instances
> of vim that I start would have my full-blown plugins/settings enabled.
>
> Thanks,
> --Nate
>

I just set the same thing up yesterday. I have a ~/.bvimrc, and ~/.testvim/,
I run gvim -u ~/.bvimrc, and in .bvimrc I have this:

set
runtimepath=/home/ak/.testvim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim72,/usr/share/vim/vimfiles/after,/var/lib/vim/addons/after,/home/ak/.testvim/after

Hope this helps.. -ak


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