Technology
 

Adding Vim to MS-Windows File Explorer Menu

From Vim Tips Wiki

(Redirected from VimTip636)

Tip 636 Previous Next created January 14, 2004 · complexity basic · author mosh · version 5.7


To add 'Edit with Vim' to the Windows File Explorer context 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.
  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/""

[edit] Comments

Why don't you use GvimExt?


i thought this facility is already available if you install gvim... am i wrong?


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\""