InWindowsUsed inVimYou can select"Edit with vimTo open the file. However, files opened in this way will be opened in the new window, insteadUltra EditOpen it in a new tab.
Vim 1, 7.0Tabs are already supported. How can I create a new tag instead of a new window when opening a file? The following VBScript implements this function by modifying the registry. Don't worry, it won't damage your registry.
Save the following content to a file namedVim. vbs:
Option Explicit ' Force display of declared variables.
On Error Resume Next ' Do not handle errors
Dim Wshshell
Set Wshshell = Wscript. Createobject ( " Wscript. Shell " )
wshshell. regdelete " hkey_classes_root \ * \ openwithlist \ gvim.exe \ "
wshshell. regdelete " hkey_classes_root \ * \ shellex \ contextmenuhandlers \ gvim \ "
wshshell. regdelete " hkey_classes_root \ * \ shell \ Use & Vim to edit \ command \ "
DimGvimpath
Gvimpath=Wshshell. regread ("HKEY_LOCAL_MACHINE \ SOFTWARE \ Vim \ gvim \ path")
Wshshell. regwrite " Hkey_classes_root \ * \ shell \ edit \ command \ with & Vim \ " ,_
CHR ( 34 ) + Gvimpath + CHR ( 34 ) + " -P -- remote-tab-silent " + _
CHR ( 34 ) + " % 1 " + CHR ( 34 ) + _
CHR ( 34 ) + " % * " + CHR ( 34 ), " REG_SZ "
Double-clickVim. vbsFile.
OKRight-click the file you want to open and you will see"Edit with vim"Item? Select this option to open the file on a new Vim tab.
This method is passed in Win2k + vim7.1. It is estimated that there is no problem in WINXP.
Hope to use ^-^ for you.