Open-in-tab support for Vim 7.0 Windows
Vim 7.0 contains a beautiful new feature to let users open new files in tabs. Unfortunately, the Vim shell extension shipped with 7.0 windows puts in absolutely no effort to make this work.
I read all the articles on Vim.org and while hundreds of people asked for a solution to this, no one has found one. The closest anyone has come is a hack to allow opening a group of files to open into tabs in one Vim instance.
Tonight I found the answer.
The first step is to open Registry Editor and delete HKCR\*\shellex\ContextMenuHandlers\gvim\. With this key deleted, apply the following registry patch.
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\\*\\Shell\\Edit with &Vim] [HKEY_CLASSES_ROOT\\*\\Shell\\Edit with &Vim\\command] @="\\"C:\\\\Program Files\\\\Vim\\\\vim70\\\\gvim.exe\\" -p --remote-tab-silent \\"%1\\" \\"%*\\""
This will give you a new context menu “Edit with Vim” beneath your last filetype specific shell command.
Using this new command, all files will open into a single instance of Vim with each file going into a unique tab. Also, if you select a group of files and pick “Edit with Vim”, each file will open into new tabs in the current Vim instance.
Hope this helps some other users resolve this nasty Vim 7.0 annoyance.
Happy Vimming.
About this entry
You’re currently reading “Open-in-tab support for Vim 7.0 Windows,” an entry on CinnamonPirate.com
- Published:
- Thursday, August 24th, 2006 at 9:50 pm
- Author:
- Derrick Sobodash
- Category:
- Jargon












No comments
Jump to comment form | comments rss