How can I set an "open with" keyboard shortcut in windows 7?
Solution 1
Create an entry in HKEY_CLASSES_ROOT\*\shell
1. Right-click it and choose new key - Name it "Open with VIM"
2. Right Click the new key - choose new key - and name it "command"
3. Set that key's default value to "PathToVIM" "%1" with quotes
It is a mouse shortcut, instead of keyboard. From then on right clicking on any file with give a "Open with VIM" in its context menu.
Solution 2
Works perfectly well as mentioned on microsoft's site https://answers.microsoft.com/en-us/windows/forum/windows_vista-desktop/right-click-open-with-command-missing-help-please/a9c3f139-075c-4285-b87d-25e899fb8b27
By design, the Open With menu option is not available when you right-click executable files (.cmd, .bat, .pif, .scf, .exe, .com, or .scr), or shortcuts to executable files.
If you've lost the Open With menu option for ALL file types, including non-executable files, follow this steps:
Click Start, All Programs, Accesories, Notepad.
Copy and paste this text:
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT*\shellex\ContextMenuHandlers\Open With] @="{09799AFB-AD67-11d1-ABCD-00C04FC30936}"
Click File, Save As, name the file "OpenWith.reg" (WITH THE QUOTATION MARKS) and click OK.
Now double-click OpenWith.reg, click Continue, Yes, OK, and see if the problem is solved.
Hope it helps.
Related videos on Youtube
DanB
Updated on September 18, 2022Comments
-
DanB almost 2 years
I have a shortcut to open vim, but I would like to create a shortcut to open the currently selected file in windows explorer with vim (if that is not the program associated with the file's type).
Using the shortcut for the executable opens it with no file selected.
-
DanB almost 13 yearsI don't want vim to become the new default for that file type. I just want to make it easier to open the file type with vim. For instance, I want html files to default to a browser, but I shouldn't have to search through the menus for the "open with" every time I want to open it with an editor.
-
Traveling Tech Guy almost 13 yearsThen set is as the default HTML editor in your default browser (look for instructions o how to set default applications for your preferred browser)
-
DanB almost 13 yearsMy goal is to open any file in my editor of choice (which happens to be VIM) with a keystroke-combination. I only gave html as an example, but I don't understand how setting my editor in the browser achieves that goal even for html files.
-
DavidPostill over 7 yearsWelcome to Super User! This is really a comment and not an answer to the original question. You can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. Please read Why do I need 50 reputation to comment? What can I do instead?