Vim Tips Wiki
(general cleanup and review, and removing duplicate tag - this content is different enough to deserve its own page I think)
(clarify a little)
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
  +
{{TipImported
{{Tip
 
 
|id=886
 
|id=886
  +
|previous=885
|title=Add Vim to Windows Send To menu
 
  +
|next=888
|created=March 1, 2005 11:42
+
|created=2005
 
|complexity=basic
 
|complexity=basic
 
|author=Madhan Ganesh
 
|author=Madhan Ganesh
 
|version=6.0
 
|version=6.0
 
|rating=27/24
 
|rating=27/24
  +
|category1=Windows
|text=
 
  +
|category2=
 
}}
 
}}
  +
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:
Easily open any file(s) in Vim with any options you like by adding a shortcut to Vim to your SendTo directory, located at "C:\Documents and Settings\&lt;YOUR USER NAME&gt;\SendTo". This will add vim.exe (or gvim.exe) to the "Send To" context menu.
 
   
 
*You can add a "diff in Vim" shortcut with <code>"C:\Program Files\Vim\vim71\gvim.exe" -d</code>
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" shortuct with "C:\Program Files\Vim\vim71\gvim.exe" -d
 
 
*You can make Vim [[Launch_files_in_new_tabs_under_Windows|launch the selected files in tabs]]
 
*You can make Vim [[Launch_files_in_new_tabs_under_Windows|launch the selected files in tabs]]
  +
*You can make a "read only Vim" shortcut with <code>"C:\Program Files\Vim\vim71\gvim.exe" -R</code>
   
 
If you do not like using the "Send To" context menu, you can [[Launch_files_in_new_tabs_under_Windows|automatically launch files in Vim]] with file associations (even [[Make_vim_the_editor_for_files_with_unregistered_extensions_in_Windows|unknown file types]] or [[Associate_files_with_no_extension_to_Vim_under_Windows|files with no extension]]).
 
If you do not like using the "Send To" context menu, you can [[Launch_files_in_new_tabs_under_Windows|automatically launch files in Vim]] with file associations (even [[Make_vim_the_editor_for_files_with_unregistered_extensions_in_Windows|unknown file types]] or [[Associate_files_with_no_extension_to_Vim_under_Windows|files with no extension]]).
   
== Comments ==
+
==Comments==
 
[[Category:Windows]]
 

Latest revision as of 15:12, 18 April 2013

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).

Comments[]