sponsor Vim development Vim logo go to HTTPS page Vim Book Ad

gvimext.dll: support tabs under VIM 7 : Support loading files into a VIM tab

 script karma  Rating 166/47, Downloaded by 2182    Comments, bugs, improvements  Vim wiki

created by
Tianmiao Hu
script type
Update: if you want to always open files in a tab, there is a simple solution with no need for a custom gvimext.dll.  Add the below entry to .vimrc file:
autocmd BufReadPost * tab ball
This is a tip by "jackal" from the below link:

--- The below instructions are needed if you want to switch between tab and no tab. ---
Important: this update only applies to VIM 7.

This update to gvimext.dll supports the loading of files under a new tab in VIM 7.  Both the gvimext.dll and its updated source codes are provided in the attached zip file.

I believe this code change will be included in the upcoming VIM release.  So this upload is for the brave and the impatient.

Below is the usage:
0.  The new dll will display "Edit with ... using tabs" options upon right-click on files in Windows Explorer based on a registry key and the Shift key combination.
1.  If you don't import UseTab.reg file into registry, gvimext.dll will behave just like before the change.  You can still get the "using tabs" options by holding down the Shift key before right-clicking the files.
2.  Shift key effect
Shift key serves as a toggle key for the "Edit with ... using tabs" context menu.  If you hold down the Shift key and then right-click the selected files in Windows Explorer, the opposite of the default Vim context menu will display.
Once the Vim content menu displays, you don't need to hold down the Shift key anymore.  Its effect will hold until the next Right-Click.
install details
1.  Replace existing gvimext.dll with the updated version.
Make a backup of your existing gvimext.dll.  You need to make sure that the existing gvimext.dll is not locked before you copy over the new file.  One way to do it is to open an DOS window, go to the directory where gvimext.dll resides, rename the existing file using the below command:
ren gvimext.dll gvimext.old.dll
and then copy over the new dll (assuming the new dll is at c:\temp)
copy c:\temp\gvimext.dll .
You need to reboot your machine after this.
Another way is to use a tool to kill the process (Windows Explorer) that locks gvimext.dll.  One tool is the "Process Explorer" from sysinternals (http://www.microsoft.com/technet/sysinternals/ProcessesAndThreads/ProcessExplorer.mspx)
2.  UseTab.reg
This file will add the following registry value:
The above value will make the "Edit with ... using tabs" context menu as the default menu.
To import this registry file, right-click it and choose Merge in Windows Explorer.

Rating scripts is only available on the HTTPS page

script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
GvimExt_tab_V2.zip 2.0 2007-06-13 7.0 Tianmiao Hu Updated to avoid bell sound when VIM already in command mode.
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
SourceForge.net Logo