On 2006-11-30, Tom Purl <[EMAIL PROTECTED]> wrote:
> Forgive me if this is double-posted.  I'm having e-mail problems this morning.
> 
> I'm trying to use Gvim on Windows from a USB thumbdrive.  I found and
> installed
> the GvimPortable project (http://portablegvim.sourceforge.net/), and it works
> pretty well.
> 
> The only problem is that I would like to use a non-standard location for
> my vimfiles directory.

[...]

> I'm currently able to set the location of the vimrc file using the
> GVimPortable.ini file, but I'm unable to specify the location of my
> custom vimfiles directory.  Since my vimfiles directory is usually
> placed in my $HOME directory, I tried putting both of the following
> commands into my vimrc:
> 
>     let $HOME = "."
>     let $HOME = "E:/Apps/_conf/vim"
> 
> Both commands seems to change the value of the $HOME dir, but it does
> nothing to load the plugins and such in my custom vimfiles directory.
> 
> Does anyone know how to fix this?

    :help rtp

I can't determine from the vim documentation when 'runtimepath' is 
set, although it appears to be before vimrc is sourced, so as you 
have discovered, setting $HOME in vimrc doesn't affect 
'runtimepath'.  One solution would be to set $HOME before vimrc is 
sourced, if that's possible in your situation.  Another solution is 
to set or edit 'runtimepath' in your vimrc, e.g.,

    let &rtp = substitute(&rtp, "$HOME", 'E:/Apps/_conf/vim', 'g')

I have edited my 'runtimepath' in this way on one of my systems, but 
I've not tested the specific example above.

HTH,
Gary

-- 
Gary Johnson                 | Agilent Technologies
[EMAIL PROTECTED]     | Wireless Division
                             | Spokane, Washington, USA

Reply via email to