Wednesday, August 26, 2009

Re: Moved vimfiles directory, can't get vim to use it

On 2009-08-26, Ben Fritz wrote:
> On Aug 26, 10:08 am, Dave <davem...@gmail.com> wrote:
> > I've moved my vimfiles folder to my dropbox folder and am trying to
> > get vim to use it.
> >
> > In my vimrc I've got this:
> >
> > let $VIMRUNTIME="~\\Documents\\My\ Dropbox"
> > let $VIM="~\\Documents\\My\ Dropbox"
> >
> > But when I open a file it's still looking in c:\program files\vim:
> >
> > E254: Cannot allocate color grey95
> > Error detected while processing C:\Program Files (x86)\Vim\vim72\colors
> > \d
> > esert.vim:
> >
> > I've tried various paths but nothing seems to tell Vim to look in the
> > correct place.
> >
> > Any ideas?
>
> By the time your .vimrc has been sourced, it's already too late for
> the environment variables. Try changing the environment variables
> themselves, from OUTSIDE Vim. You MIGHT be able to do what you want by
> tweaking the 'runtimepath' option, but I'm not certain whether that
> will work or how hard it is.

$VIMRUNTIME doesn't point to your vimfiles folder, it points to the
distributed runtime files for the version of vim you're running.
The variable you want to change is 'runtimepath'. Depending on what
you're trying to achieve, you could set your 'runtimepath' early in
your vimrc like this:

let &rtp = "~/Documents/My Dropbox/vimfiles," . $VIMRUNTIME . ",~/Documents/My Dropbox/vimfiles/after"

Regards,
Gary

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

No comments:

Post a Comment