tags:

views:

2279

answers:

4

Hi all,

I am trying to get the "Edit with Vim" my Right click context menu to work, so that each new file I open opens in a new tab in a single instance of vim.

Currently, using Regedit I have set

\HKEY-LOCAL-MACHINE\SOFTWARE\Vim\Gvim\path = "C:\Programs\Vim \vim72\gvim.exe" -p --remote-tab-silent "%*"

The registry key is of type REG_SZ

This almost works... Currently it opens the file in a new tab, but it also opens another tab (which is the active tab) the tab is labeled \W\S\ --literal and the file seems to be trying to open the following file.

C:\Windows\System32--literal

I think the problem is around the "%*" - I tried changing that to "%1", but if i do that I get an extra tab called %1.

Vim version 7.2 (although I saw the same behaviour on 7.1) Windows vista home premium

Thanks for any help.

David.

+5  A: 

Try setting it to: "C:\Programs\Vim \vim72\gvim.exe" -p --remote-tab-silent "%1" "%*"

See: http://www.vim.org/tips/tip.php?tip_id=1314

EDIT: As pointed out by Thomas, vim.org tips moved to: http://vim.wikia.com/

See: http://vim.wikia.com/wiki/Add_open-in-tabs_context_menu_for_Windows

kobusb
This old vim.org tips have moved. kobusb: could you edit your answer to mention this instead? http://vim.wikia.com/wiki/Add_open-in-tabs_context_menu_for_Windows
Thomas Kammeyer
Thomas Kammeyer
A: 

I would recommend trying Cream.

Cream is a set of scripts and add-ons that sit on top of gVim. Cream doesn't change the appearance of gVim, but it does change the way it behaves.

One of those behaviours is a tabbed document interface. Other behaviours are listed here. The downloads page is here.

Lord Future
+1  A: 
David Turner
A: 

You were on the right track:

HKEY-LOCAL-MACHINE\SOFTWARE\Vim\Gvim\path = "C:\Programs\Vim \vim72\gvim.exe" -p

was sufficient ... it works!!

Krishna