For me, this issue is specific to opening files through the context menu with gVIm, but it probably applies to more general situations too.

In particular, I want to get gVim to open a file with a single key press from the Windows 7 context menu.

In Windows XP, I could just right click, and type v, and my file (of any extension) would open for editing in gVim. In Windows 7, there seems to be another item using the v shortcut ("Restore previous versions"), so now when I type v the "Edit with Vim" option is highlighted but doesn't instantly run (hitting v subsequently toggles between the 2 items).

There seems to be no context item using the shortcut g, so perhaps I can change it to that. However, I can't find how to do that. Can anyone explain?

Other questions on SU (such as this, and this) focus on how to add extra items to the context menu, but don't seem to cover how to specify a particular shortcut key. They are very close to what I'm trying to do, but not the same, so this is not a duplicate question of those.


I use vim constantly under Windows, and I really miss the ability to use right-click + v to instantly open a file (or alt+f,v if going mouse-free in Explorer). I have also never once found a use for the "Restore previous versions" feature which has hijacked 'v'!

So I found an article that explains how to remove the "Restore previous versions" menu item via registry edits. I never use this menu item anyway, and I don't miss it. Besides, they provide a registry file to restore the menu item, should you ever need it.


I'll capture the reg files here for posterity.


Windows Registry Editor Version 5.00






Windows Registry Editor Version 5.00





A shortcut key for a context menu item can be set by adding a & symbol before the character you want to use.

E.g.: Edit &file with Vim would allow you to execute the command by pressing Shift+F10,f (or Alt+f,f on Windows 7).

Screenshot of registry entry for shortcut key (sorry, I'm not allowed to embedd the picture directly yet)

As an example, I've created a GitHub Gist for adding a context menu entry, which opens a selected file within the Vim editor included in Git Bash for Windows.

See here: https://gist.github.com/dwettstein/e5349a12852a7aadfda419e76124919c

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.