sponsor Vim development Vim logo Vim Book Ad

basic Tip #636: Adding Vim to MS-Windows File Explorer Menu

 tip karma   Rating 31/12, Viewed by 1586 

created:   January 14, 2004 17:53      complexity:   basic
author:   http://www.cs.albany.edu/~mosh      as of Vim:   5.7

What:  To Add 'Edit with Vim' to 'Windows File Explorer'  
'right click Menu'

1. Save this file as edit-with-vim.reg,
2. Make sure the paths are right for your machine
3. Change each fowardslash to backslash
   with the vim command :%s,/,\\,g
4. Click on it in explorer or import this file in regedit.exe
   voila, your explorer right-click menu will have extra action items,
   it's better than the send-to.
5. The double quotes are needed for filenames with spaces.
6. The '*' means 'for all files'.

REGEDIT4
[HKEY_CLASSES_ROOT/*/shell]
[HKEY_CLASSES_ROOT/*/shell/vim]
@="Edit with &vim;"
[HKEY_CLASSES_ROOT/*/shell/vim/command]
@="c://bin32//gvim.exe /"%1/""
[HKEY_CLASSES_ROOT/*/shell/_emacs]
@="Edit with &Emacs;"
[HKEY_CLASSES_ROOT/*/shell/_emacs/command]
@="c://emacs//bin//runemacs.exe /"%1/""      

    

 rate this tip  Life Changing Helpful Unfulfilling 

<<getting colors to work on solaris | execute accidently inserted commands >>

Additional Notes

Anonymous, January 15, 2004 18:44
Why don't you use GvimExt?
[email protected], January 16, 2004 2:08
i thought this facility is already available if you  install gvim... am i wrong?
http://www.cs.albany.edu/~mosh, January 16, 2004 20:12
This will allow window's explorer to launch
vim on directories also (the paths have double backslashes).


[HKEY_CLASSES_ROOT\Directory\shell\vim_dired]
@="gvim dired"

[HKEY_CLASSES_ROOT\Directory\shell\vim_dired\Command]
@="c:\\bin32\\gvim.exe \"%1\""


Anonymous, January 17, 2004 9:52
What I'd kill for would be the ability to always have GvimExt's "Edit with Vim" menu item as the *first* item on the menu (like it was with Vim 5.x) and *also* have 2 additional context menu options:

- Vertically split into existing Vim [foo]
- Horizontally split into existing Vim [foo]
If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to [email protected] after searching the archive. Help Bram help Uganda.
Sponsored by Web Concept Group Inc. SourceForge Logo