Wikia

Vim Tips Wiki

Add Vim to Windows Send To menu

Talk0
1,610pages on
this wiki
Revision as of 15:12, April 18, 2013 by Fritzophrenic (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Tip 886 Printable Monobook Previous Next

created 2005 · complexity basic · author Madhan Ganesh · version 6.0


In Windows, you can easily open any files in Vim with whatever options you like by adding a shortcut to your SendTo directory. In Windows XP and earlier, the SendTo directory is located at "C:\Documents and Settings\<YOUR USER NAME>\SendTo". In Windows 7 and Vista the path is somewhere under your user name (AppData/Roaming/etc.), but it is easier to access this folder by typing "shell:sendto" into Explorer's address bar or a "Run" dialog. Just creating a shortcut to Vim in this directory will add Vim to the "Send To" context menu.

You can specify any options you like with this shortcut by editing the "target" field under the shortcut properties. For example:

  • You can add a "diff in Vim" shortcut with "C:\Program Files\Vim\vim71\gvim.exe" -d
  • You can make Vim launch the selected files in tabs
  • You can make a "read only Vim" shortcut with "C:\Program Files\Vim\vim71\gvim.exe" -R

If you do not like using the "Send To" context menu, you can automatically launch files in Vim with file associations (even unknown file types or files with no extension).

CommentsEdit

Advertisement | Your ad here

Around Wikia's network

Random Wiki