Vim Tips Wiki
We recommend that you log in before editing. This will allow other users to leave you a message about your edit, and will let you track edits via your Watchlist. Creating an account is quick and free.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 11: Line 11:
 
|category2=
 
|category2=
 
}}
 
}}
Using the Windows installer to install Vim with default settings will put the executable in a directory with a name like <code>C:\Program Files\vim\VimXX</code> (where <code>XX</code> is a number such as <code>72</code> to indicate version 7.2). When the next version is installed, files will be placed in a new subdirectory, for example <code>Vim73</code> for version 7.3. This tip describes how to handle the fact that you may have registered Vim as the editor to be used with various applications, and now the path to the executable needs to be changed in multiple locations.
+
Using the Windows installer to install Vim with default settings will put the executable in a directory with a name like {{tt|C:\Program Files\vim\VimXX}} (where <code>XX</code> is a number such as <code>72</code> to indicate version 7.2). When the next version is installed, files will be placed in a new subdirectory, for example <code>Vim73</code> for version 7.3. This tip describes how to handle the fact that you may have registered Vim as the editor to be used with various applications, and now the path to the executable needs to be changed in multiple locations.
   
 
==Standard procedure==
 
==Standard procedure==
Line 30: Line 30:
 
==Directory link==
 
==Directory link==
 
When installing Vim on an NTFS file system (pretty much all new computers), do the following:
 
When installing Vim on an NTFS file system (pretty much all new computers), do the following:
#Go to the Vim directory (for example, <code>C:\Program Files\vim</code>).
+
#Go to the Vim directory (for example, {{tt|C:\Program Files\vim}}).
#Create a junction (or, better, a [[wikipedia:NTFS symbolic link|symbolic link]]) named "runtime" to the directory with the executable (for example, <code>C:\Program Files\vim\vim73</code>). The name '''runtime''' is important! <span style='font-size: 85%'>The <code>linkd</code> command can create and safely delete junctions, see Microsoft's [http://support.microsoft.com/kb/205524 How to create and manipulate NTFS junction points] article</span>
+
#Create a junction (or, better, a [[wikipedia:NTFS symbolic link|symbolic link]]) named "runtime" to the directory with the executable (for example, {{tt|C:\Program Files\vim\vim73}}). The name '''runtime''' is important! <span style='font-size: 85%'>The <code>linkd</code> command can create and safely delete junctions, see Microsoft's [http://support.microsoft.com/kb/205524 How to create and manipulate NTFS junction points] article</span>
 
#Wherever you need to specify a path to gvim.exe, use the path that goes through "runtime".
 
#Wherever you need to specify a path to gvim.exe, use the path that goes through "runtime".
   
 
When a new version of Vim arrives, do the following:
 
When a new version of Vim arrives, do the following:
#Install it in the same main directory, but a different subdirectory (for example, when Vim 7.4 is available, it would be installed in <code>C:\Program Files\vim\vim74</code>).
+
#Install it in the same main directory, but a different subdirectory (for example, when Vim 7.4 is available, it would be installed in {{tt|C:\Program Files\vim\vim74}}).
#Go to the Vim directory (for example, <code>C:\Program Files\vim</code>).
+
#Go to the Vim directory (for example, {{tt|C:\Program Files\vim}}).
 
#Delete the existing junction "runtime" (first close all running Vim instances). <strong>Warning:</strong> Do NOT simply delete the "runtime" directory from a file explorer or with a del command, this will also delete the contents of the "real" directory it links to. You must use the same tool you used to create the junction, to remove it.
 
#Delete the existing junction "runtime" (first close all running Vim instances). <strong>Warning:</strong> Do NOT simply delete the "runtime" directory from a file explorer or with a del command, this will also delete the contents of the "real" directory it links to. You must use the same tool you used to create the junction, to remove it.
#Create a new junction "runtime" to the directory with the new executable (for example, <code>C:\Program Files\vim\vim74</code>).
+
#Create a new junction "runtime" to the directory with the new executable (for example, {{tt|C:\Program Files\vim\vim74}}).
   
 
That way, ''all'' Vim settings throughout the system should pick up the new Vim version.
 
That way, ''all'' Vim settings throughout the system should pick up the new Vim version.
Please note that all contributions to the Vim Tips Wiki are considered to be released under the CC-BY-SA
Cancel Editing help (opens in new window)