Enter Search Query:

  • 13414
  • Close

Context menu issues with gVim in Windows 7 x64

Over the years I’ve developed a serious vi editor habit (mostly from my days working as a system administrator). I use it for coding in PHP, c, and perl because it is convenient and lightweight. Since gVim has been available for Windows, I have never had any issues running it on my home computer and that Edit with VIM right-click context menu item became my best friend. Until now that is. Windows 7 64-bit will run gVim as a 32bit application, but the context menu shortcuts are gone. Here is my workaround.
I found that there are two ways of doing this. One involves messing around with the registry (see Disclaimer), the other involves creating a shortcut.

contextmenu

If you want to have the same context menu functionality you got from gVim in 32-bit Windows you’ll need to make the following changes to the [HKEY_CLASSES_ROOT*shell] key in the registry:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT*shellEdit with Vim]

[HKEY_CLASSES_ROOT*shellEdit with Vimcommand]
@=”C:\Program Files (x86)\Vim\vim72\gvim.exe “%1”

If you are lazy you can simply download my registry export file by clicking here and merge it into your registry (see Disclaimer).

Don’t want to make changes to the registry? Then here is the alternative:

The Send To context menu is pretty customizable in both VISTA and Windows 7. You can add as many shortcuts to this context menu as you want simply by dragging and dropping them into this folder:

C:Users<user name>AppDataroamingmicrosoftwindowsSendTo

sent_tomenu

So simply adding a gVim shortcut here and voila, an albeit slightly less convenient gVim shortcut now exists on the right-click context menu.
UPDATE: As mentioned by several users via comments (thank you!), it looks like the “Edit with Vim” context menu option in Windows7 x64 is now going to be installed by default with the GVIM 7.3 package. I want to take this opportunity to thank to everyone for their kind words and helpful suggestions.

June 2, 2009

Related Posts