Wikia

Vim Tips Wiki

Change the Windows Explorer hotkey for Diff with Vim

Talk0
1,612pages on
this wiki

Redirected from VimTip781

Tip 781 Printable Monobook Previous Next

created 2004 · complexity intermediate · author Yang · version 6.0


"&Diff with Vim" is a handy tool to have in Explorer, but it's more common to "&Delete" multiple files via the File menu or context menu by hitting the 'd' hotkey. Personally, I'd rather have the hotkey be changed to 'f', which isn't occupied, making the command "Di&ff with Vim".

To do this, edit the gvimext.dll file in your vim installation directory (e.g., C:\Program Files\Vim\vim63\gvimext.dll). Note that this is a binary file but you can still get it done with Vim. Look for the string "Diff with Vim", and simply move the '&' from its original position to a new one (in our case, before one of the f's). Restart your computer (or at least the explorer process) and you'll see the new menu item.

Vim 7.1 does not seem to have a hotkey by default, but you can add one in this fashion. Just be sure to only replace the "Diff with Vim" text and make no other changes.

It is best if you use binary mode when editing binary files such as this, and always insert text using replace (R) mode. Setting up Vim for binary editing beforehand is probably advisable. Making backup copies before editing is also recommended.

ReferencesEdit

CommentsEdit

Around Wikia's network

Random Wiki