path question

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

path question

Jeff Lanzarotta
Hello,

I have a couple of versions on vim setup on my pc. I'm running Windows.
Is there a way to make a common directory with my _vimrc file and
vimfiles?

For example my directory structure is setup like:

c:\vim
c:\vim\vim  <-- vim 6.4
c:\vim\vim7 <-- vim 7.0

Can I have something like

c:\vim
c:\vim\_vimrc
c:\vim\vimfiles
c:\vim\vim
c:\vim\vim7

where vim 6.4 and 7.0 can share the _vimrc file and vimfiles directory?

As of now, I can not seem get this to work. Is something like this
possible?

Regards,

-Jeff
Reply | Threaded
Open this post in threaded view
|

Re: path question

Peter Hodge-2
You should be able to use:

  ~\_vimrc
  ~\vimfiles

Under WinXP this expands out to something like:

  C:\Documents and Settings\Peter\_vimrc
  C:\Documents and Settings\Peter\vimfiles

regards,
Peter



--- Jeff Lanzarotta <[hidden email]> wrote:

> Hello,
>
> I have a couple of versions on vim setup on my pc. I'm running Windows.
> Is there a way to make a common directory with my _vimrc file and
> vimfiles?
>
> For example my directory structure is setup like:
>
> c:\vim
> c:\vim\vim  <-- vim 6.4
> c:\vim\vim7 <-- vim 7.0
>
> Can I have something like
>
> c:\vim
> c:\vim\_vimrc
> c:\vim\vimfiles
> c:\vim\vim
> c:\vim\vim7
>
> where vim 6.4 and 7.0 can share the _vimrc file and vimfiles directory?
>
> As of now, I can not seem get this to work. Is something like this
> possible?
>
> Regards,
>
> -Jeff
>



               
____________________________________________________
Do you Yahoo!?
The New Yahoo! Movies: Check out the Latest Trailers, Premiere Photos and full Actor Database.
http://au.movies.yahoo.com
Reply | Threaded
Open this post in threaded view
|

Re: path question

A.J.Mechelynck
In reply to this post by Jeff Lanzarotta
Jeff Lanzarotta wrote:

> Hello,
>
> I have a couple of versions on vim setup on my pc. I'm running Windows.
> Is there a way to make a common directory with my _vimrc file and
> vimfiles?
>
> For example my directory structure is setup like:
>
> c:\vim
> c:\vim\vim  <-- vim 6.4
> c:\vim\vim7 <-- vim 7.0
>
> Can I have something like
>
> c:\vim
> c:\vim\_vimrc
> c:\vim\vimfiles
> c:\vim\vim
> c:\vim\vim7
>
> where vim 6.4 and 7.0 can share the _vimrc file and vimfiles directory?
>
> As of now, I can not seem get this to work. Is something like this
> possible?
>
> Regards,
>
> -Jeff

Normally (and I recommend not to deviate from this standard), the path
structure for Vim (on Windows, but in Vim notation) is as follows:

- $VIM : some directory ending in .../vim, usually but not necessarily
"C:\Program Files\Vim"; sometimes just "C:\vim")
- $VIM/vim63 and its subdirectories: the 6.3 distribution (if installed)
- $VIM/vim64b and its subdirectories: the 6.4b BETA distribution (if
installed)
- $VIM/vim70aa and its subdirectories: the 7.0aa ALPHA distribution (if
installed)
- $VIM/vimrc : a system-wide vimrc (if any)
- $VIM/vimfiles and its subdirectories: system-wide addons and
customizations to Vim.
- $VIM/vimfiles/after and its subdirectories: system-wide
|after-directory| (q.v.)
- $HOME : some directory which, on multiuser systems, is private to one
user. On XP a typical value would be "C:\Documents and
Settings\JohnSmith". On single-user systems ONLY, $VIM can be used
instead, if the HOME variable is not set in the environment, or if it is
set to the same value as the VIM variable.
- $HOME/_vimrc and $HOME/_gvimrc : user-private startup scripts
- $HOME/vimfiles and its subdirectories: user-private add-ons and
customizations to Vim.
- $HOME/vimfiles/after and its subdirectories: user-private
|after-directory| (q.v.)

Notes:
1. Wherever I said "...and its subdirectories", a given subdirectory
needs only be created when there is a need to put one or more files in
it. $VIMRUNTIME (i.e., $VIM/vim[version]) comes with the full tree
created and filled-up; the other trees have exactly the same layout.
2. Everything except the $VIMRUNTIME tree as defined above is common to
all versions.
3. You may set VIM and HOME, but not VIMRUNTIME, in your system
environment, if you want your various versions to coexist peacefully.
Also, it is important that the version-dependent install directories be
given the names shown above and none other.
4. The install directory (the $VIMRUNTIME) for only one version should
be in your PATH. That version of Vim will be your "default" version. You
can invoke any other version, either by first changing to its install
directory, or by invoking it with a full path.
5. If you use the matchit plugin, the following slight variation on its
"classical" install procedure will make sure that each version of Vim
will use the version of matchit that came with it:
5.1. Don't move matchit.vim from its "macros" subdirectory.
5.2. Create the directory $VIM/vimfiles/plugin (or
$HOME/vimfiles/plugin) if it doesn't yet exist, then place in it a file
named matchit.vim with only the following line in it:
        runtime macros/matchit.vim
5.3. One version of matchit.txt (the matchit help) will have to be
copied to the $VIM/vimfiles/doc (or $HOME/vimfiles/doc) directory. Use
the version that came with your "default" distribution or the most
recent one, at your choice.
5.4. After step 5.3, run ":helptags $VIM/vimfiles/doc" (or ":helptags
$HOME/vimfiles/doc", without the quotes in either case) in any version
of Vim to generate the tags file for the matchit help.


HTH,
Tony.

Reply | Threaded
Open this post in threaded view
|

Re: path question

Jeff Lanzarotta
Ok, I have my system setup like this:

c:\vim
c:\vim\vim64b
c:\vim\vim70aa
c:\vim\vimfiles
c:\vim\vimrc

I compiled vim70aa from scratch and put it's executable gvim.exe in the
c:\vim\vim70aa directory.

Now when I run c:\vim\vim700aa\gvim.exe I get the following error:

--------
Error detected while processing c:\vim\vimrc:
line 290:
E484: Can't open file c:\vim\vim70aa\syntax\syntax.vim
--------

How come it is not picking up my runtime directory under
c:\vim\vim70aa? What have I done wrong?

--- "A. J. Mechelynck" <[hidden email]> wrote:

> Jeff Lanzarotta wrote:
> > Hello,
> >
> > I have a couple of versions on vim setup on my pc. I'm running
> Windows.
> > Is there a way to make a common directory with my _vimrc file and
> > vimfiles?
> >
> > For example my directory structure is setup like:
> >
> > c:\vim
> > c:\vim\vim  <-- vim 6.4
> > c:\vim\vim7 <-- vim 7.0
> >
> > Can I have something like
> >
> > c:\vim
> > c:\vim\_vimrc
> > c:\vim\vimfiles
> > c:\vim\vim
> > c:\vim\vim7
> >
> > where vim 6.4 and 7.0 can share the _vimrc file and vimfiles
> directory?
> >
> > As of now, I can not seem get this to work. Is something like this
> > possible?
> >
> > Regards,
> >
> > -Jeff
>
> Normally (and I recommend not to deviate from this standard), the
> path
> structure for Vim (on Windows, but in Vim notation) is as follows:
>
> - $VIM : some directory ending in .../vim, usually but not
> necessarily
> "C:\Program Files\Vim"; sometimes just "C:\vim")
> - $VIM/vim63 and its subdirectories: the 6.3 distribution (if
> installed)
> - $VIM/vim64b and its subdirectories: the 6.4b BETA distribution (if
> installed)
> - $VIM/vim70aa and its subdirectories: the 7.0aa ALPHA distribution
> (if
> installed)
> - $VIM/vimrc : a system-wide vimrc (if any)
> - $VIM/vimfiles and its subdirectories: system-wide addons and
> customizations to Vim.
> - $VIM/vimfiles/after and its subdirectories: system-wide
> |after-directory| (q.v.)
> - $HOME : some directory which, on multiuser systems, is private to
> one
> user. On XP a typical value would be "C:\Documents and
> Settings\JohnSmith". On single-user systems ONLY, $VIM can be used
> instead, if the HOME variable is not set in the environment, or if it
> is
> set to the same value as the VIM variable.
> - $HOME/_vimrc and $HOME/_gvimrc : user-private startup scripts
> - $HOME/vimfiles and its subdirectories: user-private add-ons and
> customizations to Vim.
> - $HOME/vimfiles/after and its subdirectories: user-private
> |after-directory| (q.v.)
>
> Notes:
> 1. Wherever I said "...and its subdirectories", a given subdirectory
> needs only be created when there is a need to put one or more files
> in
> it. $VIMRUNTIME (i.e., $VIM/vim[version]) comes with the full tree
> created and filled-up; the other trees have exactly the same layout.
> 2. Everything except the $VIMRUNTIME tree as defined above is common
> to
> all versions.
> 3. You may set VIM and HOME, but not VIMRUNTIME, in your system
> environment, if you want your various versions to coexist peacefully.
> Also, it is important that the version-dependent install directories
> be
> given the names shown above and none other.
> 4. The install directory (the $VIMRUNTIME) for only one version
> should
> be in your PATH. That version of Vim will be your "default" version.
> You
> can invoke any other version, either by first changing to its install
> directory, or by invoking it with a full path.
> 5. If you use the matchit plugin, the following slight variation on
> its
> "classical" install procedure will make sure that each version of Vim
> will use the version of matchit that came with it:
> 5.1. Don't move matchit.vim from its "macros" subdirectory.
> 5.2. Create the directory $VIM/vimfiles/plugin (or
> $HOME/vimfiles/plugin) if it doesn't yet exist, then place in it a
> file
> named matchit.vim with only the following line in it:
> runtime macros/matchit.vim
> 5.3. One version of matchit.txt (the matchit help) will have to be
> copied to the $VIM/vimfiles/doc (or $HOME/vimfiles/doc) directory.
> Use
> the version that came with your "default" distribution or the most
> recent one, at your choice.
> 5.4. After step 5.3, run ":helptags $VIM/vimfiles/doc" (or ":helptags
> $HOME/vimfiles/doc", without the quotes in either case) in any
> version
> of Vim to generate the tags file for the matchit help.
>
>
> HTH,
> Tony.
>
>

Reply | Threaded
Open this post in threaded view
|

Re: path question

Jeff Lanzarotta
OBTW, I have my %VIM% environment variable set to c:\vim

--- Jeff Lanzarotta <[hidden email]> wrote:

> Ok, I have my system setup like this:
>
> c:\vim
> c:\vim\vim64b
> c:\vim\vim70aa
> c:\vim\vimfiles
> c:\vim\vimrc
>
> I compiled vim70aa from scratch and put it's executable gvim.exe in
> the
> c:\vim\vim70aa directory.
>
> Now when I run c:\vim\vim700aa\gvim.exe I get the following error:
>
> --------
> Error detected while processing c:\vim\vimrc:
> line 290:
> E484: Can't open file c:\vim\vim70aa\syntax\syntax.vim
> --------
>
> How come it is not picking up my runtime directory under
> c:\vim\vim70aa? What have I done wrong?
>
> --- "A. J. Mechelynck" <[hidden email]> wrote:
>
> > Jeff Lanzarotta wrote:
> > > Hello,
> > >
> > > I have a couple of versions on vim setup on my pc. I'm running
> > Windows.
> > > Is there a way to make a common directory with my _vimrc file and
> > > vimfiles?
> > >
> > > For example my directory structure is setup like:
> > >
> > > c:\vim
> > > c:\vim\vim  <-- vim 6.4
> > > c:\vim\vim7 <-- vim 7.0
> > >
> > > Can I have something like
> > >
> > > c:\vim
> > > c:\vim\_vimrc
> > > c:\vim\vimfiles
> > > c:\vim\vim
> > > c:\vim\vim7
> > >
> > > where vim 6.4 and 7.0 can share the _vimrc file and vimfiles
> > directory?
> > >
> > > As of now, I can not seem get this to work. Is something like
> this
> > > possible?
> > >
> > > Regards,
> > >
> > > -Jeff
> >
> > Normally (and I recommend not to deviate from this standard), the
> > path
> > structure for Vim (on Windows, but in Vim notation) is as follows:
> >
> > - $VIM : some directory ending in .../vim, usually but not
> > necessarily
> > "C:\Program Files\Vim"; sometimes just "C:\vim")
> > - $VIM/vim63 and its subdirectories: the 6.3 distribution (if
> > installed)
> > - $VIM/vim64b and its subdirectories: the 6.4b BETA distribution
> (if
> > installed)
> > - $VIM/vim70aa and its subdirectories: the 7.0aa ALPHA distribution
> > (if
> > installed)
> > - $VIM/vimrc : a system-wide vimrc (if any)
> > - $VIM/vimfiles and its subdirectories: system-wide addons and
> > customizations to Vim.
> > - $VIM/vimfiles/after and its subdirectories: system-wide
> > |after-directory| (q.v.)
> > - $HOME : some directory which, on multiuser systems, is private to
> > one
> > user. On XP a typical value would be "C:\Documents and
> > Settings\JohnSmith". On single-user systems ONLY, $VIM can be used
> > instead, if the HOME variable is not set in the environment, or if
> it
> > is
> > set to the same value as the VIM variable.
> > - $HOME/_vimrc and $HOME/_gvimrc : user-private startup scripts
> > - $HOME/vimfiles and its subdirectories: user-private add-ons and
> > customizations to Vim.
> > - $HOME/vimfiles/after and its subdirectories: user-private
> > |after-directory| (q.v.)
> >
> > Notes:
> > 1. Wherever I said "...and its subdirectories", a given
> subdirectory
> > needs only be created when there is a need to put one or more files
> > in
> > it. $VIMRUNTIME (i.e., $VIM/vim[version]) comes with the full tree
> > created and filled-up; the other trees have exactly the same
> layout.
> > 2. Everything except the $VIMRUNTIME tree as defined above is
> common
> > to
> > all versions.
> > 3. You may set VIM and HOME, but not VIMRUNTIME, in your system
> > environment, if you want your various versions to coexist
> peacefully.
> > Also, it is important that the version-dependent install
> directories
> > be
> > given the names shown above and none other.
> > 4. The install directory (the $VIMRUNTIME) for only one version
> > should
> > be in your PATH. That version of Vim will be your "default"
> version.
> > You
> > can invoke any other version, either by first changing to its
> install
> > directory, or by invoking it with a full path.
> > 5. If you use the matchit plugin, the following slight variation on
> > its
> > "classical" install procedure will make sure that each version of
> Vim
> > will use the version of matchit that came with it:
> > 5.1. Don't move matchit.vim from its "macros" subdirectory.
> > 5.2. Create the directory $VIM/vimfiles/plugin (or
> > $HOME/vimfiles/plugin) if it doesn't yet exist, then place in it a
> > file
> > named matchit.vim with only the following line in it:
> > runtime macros/matchit.vim
> > 5.3. One version of matchit.txt (the matchit help) will have to be
> > copied to the $VIM/vimfiles/doc (or $HOME/vimfiles/doc) directory.
> > Use
> > the version that came with your "default" distribution or the most
> > recent one, at your choice.
> > 5.4. After step 5.3, run ":helptags $VIM/vimfiles/doc" (or
> ":helptags
> > $HOME/vimfiles/doc", without the quotes in either case) in any
> > version
> > of Vim to generate the tags file for the matchit help.
> >
> >
> > HTH,
> > Tony.
> >
> >
>
>

Reply | Threaded
Open this post in threaded view
|

Re: path question

A.J.Mechelynck
In reply to this post by Jeff Lanzarotta
Jeff Lanzarotta wrote:

> Ok, I have my system setup like this:
>
> c:\vim
> c:\vim\vim64b
> c:\vim\vim70aa
> c:\vim\vimfiles
> c:\vim\vimrc
>
> I compiled vim70aa from scratch and put it's executable gvim.exe in the
> c:\vim\vim70aa directory.
>
> Now when I run c:\vim\vim700aa\gvim.exe I get the following error:

I hope the double zero above is a typo

>
> --------
> Error detected while processing c:\vim\vimrc:
> line 290:
> E484: Can't open file c:\vim\vim70aa\syntax\syntax.vim
> --------
>
> How come it is not picking up my runtime directory under
> c:\vim\vim70aa? What have I done wrong?
>
> --- "A. J. Mechelynck" <[hidden email]> wrote:
>
[...]

OK, so where are your runtime files? You might want to check mine, from
the zipfile linked at
http://users.skynet.be/antoine.mechelynck/vim/#vim7 , which has all of
them at the right place in the directory tree. (I'm not giving the exact
zipfile name because it changes with every new snapshot.) If you want to
unpack part or all of it, give your C:\vim as the target, and select
"Use folder names"; the archive will place everything in the vim70aa
subdirectory (and its subdirectories).

See also "help $VIMRUNTIME".

Considering that you have several versions of Vim and that they must not
walk on each other's feet:

- "set" at the Dos command-line should _not_ show an entry for
VIMRUNTIME (otherwise, at most one Vim version would find its own files);
- your 7.0aa runtime files should be under
        $VIM/vim70aa/doc/
        $VIM/vim70aa/syntax/
        $VIM/vim70aa/plugin/
        $VIM/vim70aa/ftplugin/
etc., not under $VIM/vim70aa/runtime/ where Vim doesn't look for them.
(The above uses "the normal value for $VIMRUNTIME" as listed under
number 2 in ":help $VIMRUNTIME). If, as I guess, you have them all at
the above-mentioned wrong location, then if you have cygwin you can do

        cd /cygdrive/c/vim/vim70aa
        mv runtime/* .
        rmdir runtime

(or mv -v to have it display the file names as they are moved). This
will move both files and directories. I'm not sure if the equivalent
sequence of CMD.EXE commands will do it as cleanly but you might try
them if you don't have cygwin:

        C:
        cd \vim\vim70aa
        move runtime\*.* .
        rd runtime

(The dot at the end of the mv or move command is important.)


Best regards,
Tony.

Reply | Threaded
Open this post in threaded view
|

Re: path question

Jeff Lanzarotta
In reply to this post by Jeff Lanzarotta
Ok, by removing the environment variable, VIM, everything works fine.

My directory structure ended up like:

c:\vim
c:\vim\vimrc
c:\vim\vim64b
c:\vim\vim64b\runtime and all other directories...
c:\vim\vim70aa
c:\vim\vim70aa\runtime and all other directories...

Thanks for everyones help...

--- Dan Sharp <[hidden email]> wrote:

> On 10/13/05, Jeff Lanzarotta <[hidden email]> wrote:
> > OBTW, I have my %VIM% environment variable set to c:\vim
> >
> > --- Jeff Lanzarotta <[hidden email]> wrote:
> >
> > > Ok, I have my system setup like this:
> > >
> > > c:\vim
> > > c:\vim\vim64b
> > > c:\vim\vim70aa
> > > c:\vim\vimfiles
> > > c:\vim\vimrc
> > >
> > > I compiled vim70aa from scratch and put it's executable gvim.exe
> in
> > > the
> > > c:\vim\vim70aa directory.
> > >
> > > Now when I run c:\vim\vim700aa\gvim.exe I get the following
> error:
> > >
> > > --------
> > > Error detected while processing c:\vim\vimrc:
> > > line 290:
> > > E484: Can't open file c:\vim\vim70aa\syntax\syntax.vim
> > > --------
> > >
> > > How come it is not picking up my runtime directory under
> > > c:\vim\vim70aa? What have I done wrong?
>
> You shouldn't need to set %VIM% to anything given your current
> directory setup.  It will derive the correct value based on the
> directory from which you run the executable.
>
> For your problem, it sounds like you have all your runtime files in
> the
> c:\vim\vim70aa\runtime directory, which is not correct on Win32.
> Essentially, the c:\vim\vim70aa directory *is* the runtime directory,
> so everything in c:\vim\vim70aa\runtime should be moved up into
> c:\vim\vim70aa instead.
>
> Dan Sharp
>