created December 21, 2007 · complexity basic · author Fuzzymonk · version 7.0
This is no problem if you install Vim 7.2 or later.
To get "Edit with Vim" context menu for Vista, do this
a) download LATEST version of Vim from SourceForge : gvim-7-2-42.exe
b) Run the installer, accepting the license agreement
c) on Choose Components screen, expand "Icons, Menus and Shortcuts" tree
d) check the box for "Add Contextual Menu"
e) Finish the install.
NOTE: The above still won't work on Win64. However, it does work with the 64-bit binaries that can be found here.
AND IGNORE THE STUFF BELOW
Download and Install
Download and Install gVim 7.1(I used the one from )
- changed the install dir to C:\vim to get around some odd things with UAC.
- I prefer to have my vimfiles in my home directory, so I choose that option from the installer.
- I also recommend setting the hidden attribute on the vimfiles folder so it does not visually clutter up the my home directory (Right click -> properties -> General Tab -> Check Hidden).
Copy the following files into C:\vim\vim71\
- iconv.dll (from here You can find the dll file in the bin directory of the "libiconv-win32" archive.)
- libintl.dll (from here Get "intl.dll" from the bin directory in the gettext-win32 archive and store it as "libintl.dll" in the same directory as gvim.exe, overwriting the file that may already be there.)
- gvimext.dll (from script#1720)
Configure around Vista
If you want the "Edit with vim" Shell Extension in Windows Explorer:
- Run C:\vim\vim71\install.exe
- Choose no when asked if you want to uninstall, then enter "d 14"
If you get a gvim not in your path error with the "Edit with vim" shell ext, make sure you do not have gvim.exe set to run as Administrator, as that will break it. To check this, right-click on gvim.exe, select 'Properties', then the 'Compatibility' tab. Make sure 'Run this program as administrator' is unchecked, then click on 'Show settings for all users' and again make sure 'Run this program as administrator' is unchecked.
Here is the thing that stuck me for hours, if you had previously installed Vim to a diffrent location you won't be able to associate files with the new location unless you edit the registry. Go to:
Make sure the edit\command and open\command Keys have the following default value:
Windows Vista and newer creates a VirtualStore under %USERPROFILE% (often ~ in Vim) to support applications that attempt to open protected files for writing when the user doesn't have permissions. Under User Account Control (UAC), this even applies to administrators who are not running from an elevated shell.
This can lead to problems when you make any modifications under $VIM that might be installed to a protected location, such as %ProgramFiles% as it is by default. To make sure Vim doesn't keep using any files written to the VirtualStore after making modifications under $VIM, delete the VirtualStore for Vim by doing the following from a console shell.
rmdir /q /s "%USERPROFILE%\AppData\Local\VirtualStore\Program Files\Vim"
Notes No explanation has been provided for why the above suggestion about deleting a directory tree would be desirable or safe. Also, no example of a problem that can occur is available. It would be useful to document how modifications under $VIM may occur, and the effect of deleting the VirtualStore files.
Several people have reported that they had no problem installing and using Vim on Vista. The users concerned did not perform any of the steps from this tip.
Consequently, it may be better to delete this tip unless some further explanations are available as to why the recommended procedures would be helpful.
There is no known reason to take the steps recommended in the "Download and Install" section of this tip. It is always dodgy to mix files from various sources, particularly if no reason for doing so is given.
In the original tip, the author stated that the version of Vim was downloaded from hasno.info. It is always possible that the particular build of Vim had a problem. In that case, the problems presented in this tip would not be applicable to other users, and in fact might be dangerous because some fairly radical manipulations are recommended.
Please add any comments below (after a line consisting of ---- to create a horizontal rule).
From the new tips discussion:
I didn't realize that everything was working that well on other machines. I do think there is value in keeping two of the sections:
- The information on how to fix the shell extension if Vista thinks Vim needs to be run as administrator.
- The file association fix.
Where would you recommend putting these? Or are they too edge case for the wiki?
--Fuzzymonk 16:27, 14 January 2008 (UTC)
- Sorry to have not responded sooner – there has been a lot going on. I decided to just put a "to do" comment where required in the new tips, and leave it for sorting out later. If you want to pursue your suggestion, please just edit the tip here. I think any information regarding Vim on Vista should be in this tip. I don't know what to keep (Vista is outside my experience). I'm hoping to attract comments from Vista users. --JohnBeckett 04:02, 19 February 2008 (UTC)
The problem I was having was that it couldn't copy the .bat files to the Windows directory. Running install.exe as Administrator solved this problem.
I tried a few methods on this page to no avail.
The context menu stuff is not working. Tried with gvim-7-2-68.exe under Vista Home Premium 64 as Administrator.