I want Vim to reuse the currently existing instance if it exists. Usually, Vim pops up a warning about an existing swap file. Specifically, this is for switching between Vim and Visual Studio. (I know about ViEmu, but it doesn’t work with Visual Studio Express.)
Share
Poster’s Solution:
Solution:
There is a plugin in the standard distribution of Vim: runtime/macros/editexisting.vim. Just copy it to the Vim plugins directory.
Extra details for Visual Studio Integration: Follow these steps to add Vim as an external tool and assign a convenient keyboard shortcut:
Note I use slightly different settings so the cursor is set to the column from VS and centered in Vim:
Then set VS to automatically load chanages made from Vim:
Finally set Vim to automatically load changes made from VS:
My Solution
Similar, but subtly different: Save this to a .settings file and import. Uses
--servernameand--remote-callto reuse existing Vim, tailored for the current solution.