Vim Tips Wiki

Version independent installation of Vim on Windows

1,624pages on
this wiki
Add New Page
Talk0 Share
Tip 714 Printable Monobook Previous Next

created May 10, 2004 · complexity intermediate · author Baukje Miedema · version 5.7

The installer and the zip versions of the (g)vim distributions for MS-Windows install (g)vim in a directory hierarchy rooted at vim\vimxy\ where xy in the directory name is the version number. For example, vimxy would be vim72 for version 7.2. This setup means that the location of (g)vim.exe is different for every version. This setup makes good sense if you maintain several versions of vim on your computer. However, if you only keep one version of (g)vim at a time, or if you don't use an installer (for example if you compile Vim yourself, it can be convenient to always have it in the same location. The following shows you one way to achieve this.

Set up a directory hierarchy as follows:


Now put the runtime files and executables in place. You can get these files by copying from the default install location, or you can get the Vim source code and runtime files from Mercurial and compile the executables yourself.

  1. Put gvim.exe and/or vim.exe, vimrun.exe, xxd.exe, gvimext.dll into vim\
  2. Put all the remaining .vim, .txt, and other non-executable files that are distributed under vim\vimxy\ in to vim\runtime\
  3. Put the contents of the distributed vim\vimxy\plugin\ in to vim\runtime\plugin\ and so on for all the other subdirectories of vim\vimxy\ including syntax, ftplugin, indent, doc, colors, compiler, macros, tools, tutor.
  4. Put your _vimrc and _gvimrc files in vim\ with the executables.
  5. Either ensure that vim\ is in your path, or create shortcuts and/or batch (bat or cmd) files that can start vim\(g)vim.exe for you.
  6. If you have downloaded any scripts from or elsewhere, put them in the appropriate spot in the vim\vimfiles\ hierarchy where they stay separate from the official distribution files in vim\runtime\. In this way, when you upgrade (g)vim to a newer version, you will not have to copy, move or do anything with these extra files. For example, plugins from go into vim\vimfiles\plugin\ and color scheme files go into vim\vimfiles\colors\ etc.
  7. You are all done. $VIM and $VIMRUNTIME will be set automatically for you. They will point to vim\ and vim\runtime\ respectively. See :help $VIM and :help $VIMRUNTIME if you want to know how this works (and potential pitfalls).



Maybe–on w2k or newer–you should better use a junction point here.

See: "";

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Also on Fandom

Random Wiki