Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
    
Have you considered disabling the offending menu item? Look at ShellExView and ShellMenuView to enable/disable items in the context menu. –  Amazed Mar 29 '12 at 8:01
add comment

1 Answer

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.

http://www.vistax64.com/tutorials/170079-restore-previous-versions-restore-remove-context-menu.html

I'll capture the reg files here for posterity.

Remove:

Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\AllFilesystemObjects\shellex\ContextMenuHandlers\{596AB062-B4D2-4215-9F74-E9109B0A8153}]

[-HKEY_CLASSES_ROOT\CLSID\{450D8FBA-AD25-11D0-98A8-0800361B1103}\shellex\ContextMenuHandlers\{596AB062-B4D2-4215-9F74-E9109B0A8153}]

[-HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\{596AB062-B4D2-4215-9F74-E9109B0A8153}]

[-HKEY_CLASSES_ROOT\Drive\shellex\ContextMenuHandlers\{596AB062-B4D2-4215-9F74-E9109B0A8153}]

Add:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\AllFilesystemObjects\shellex\ContextMenuHandlers\{596AB062-B4D2-4215-9F74-E9109B0A8153}]

[HKEY_CLASSES_ROOT\CLSID\{450D8FBA-AD25-11D0-98A8-0800361B1103}\shellex\ContextMenuHandlers\{596AB062-B4D2-4215-9F74-E9109B0A8153}]

[HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\{596AB062-B4D2-4215-9F74-E9109B0A8153}]

[HKEY_CLASSES_ROOT\Drive\shellex\ContextMenuHandlers\{596AB062-B4D2-4215-9F74-E9109B0A8153}]
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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