Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 543329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:32:24+00:00 2026-05-13T10:32:24+00:00

I want Vim to reuse the currently existing instance if it exists. Usually, Vim

  • 0

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.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T10:32:24+00:00Added an answer on May 13, 2026 at 10:32 am

    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:

    • Title: Vim
    • Command: C:\Program Files\Vim\vim70\gvim.exe
    • Arguments: +$(CurLine) “$(ItemPath)”
    • Initial directory: $(SolutionDir)

    Note I use slightly different settings so the cursor is set to the column from VS and centered in Vim:

    • Arguments: +”call cursor($(CurLine),$(CurCol))” +”normal zz” $(ItemPath)
    • Initial directory: $(FileDir)

    Then set VS to automatically load chanages made from Vim:

    In order to effectively use the two
    together and make sure .NET does not
    complain about its files changing,
    goto Tools > Options > Environment >
    Documents and ensure these two options
    are checked: Detect when file is
    changed outside the environment.
    Auto-load changes (if not currently
    modified inside the environment).

    Finally set Vim to automatically load changes made from VS:

    :set autoread


    My Solution

    Similar, but subtly different: Save this to a .settings file and import. Uses --servername and --remote-call to reuse existing Vim, tailored for the current solution.

    <UserSettings>
        <ApplicationIdentity version="8.0"/>
        <ToolsOptions/>
        <Category name="Environment_Group" RegisteredName="Environment_Group">
            <Category name="Environment_ExternalTools" Category="{E8FAE9E8-FBA2-4474-B134-AB0FFCFB291D}" Package="{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}" RegisteredName="Environment_ExternalTools" PackageName="Visual Studio Environment Package">
                <PropertyValue name="edit with v&amp;im.Command">gvim.exe</PropertyValue>
                <PropertyValue name="edit with v&amp;im.Arguments">--servername $(SolutionFileName) --remote-silent +"call cursor($(CurLine),$(CurCol))" "$(ItemFileName)$(ItemExt)"</PropertyValue>
                <PropertyValue name="edit with v&amp;im.InitialDirectory">$(ItemDir)</PropertyValue>
                <PropertyValue name="edit with v&amp;im.SourceKeyName"/>
                <PropertyValue name="edit with v&amp;im.UseOutputWindow">false</PropertyValue>
                <PropertyValue name="edit with v&amp;im.PromptForArguments">false</PropertyValue>
                <PropertyValue name="edit with v&amp;im.CloseOnExit">false</PropertyValue>
                <PropertyValue name="edit with v&amp;im.IsGUIapp">true</PropertyValue>
                <PropertyValue name="edit with v&amp;im.SaveAllDocs">true</PropertyValue>
                <PropertyValue name="edit with v&amp;im.UseTaskList">false</PropertyValue>
                <PropertyValue name="edit with v&amp;im.Unicode">false</PropertyValue>
                <PropertyValue name="edit with v&amp;im.Package">{00000000-0000-0000-0000-000000000000}</PropertyValue>
                <PropertyValue name="edit with v&amp;im.NameID">0</PropertyValue>
            </Category>
        </Category>
    </UserSettings>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 310k
  • Answers 310k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Try upgrading your version of Flex, is that possible? It's… May 13, 2026 at 10:11 pm
  • Editorial Team
    Editorial Team added an answer Not very efficient, but relatively simple: UPDATE topic SET last_id… May 13, 2026 at 10:11 pm
  • Editorial Team
    Editorial Team added an answer The w3 org said: By default, SGML requires that all… May 13, 2026 at 10:11 pm

Related Questions

I would like my tcsh script to launch an editor (e.g., vi, emacs): #!/bin/tcsh
I typically ssh to another computer to do my development, using vim (don't post
In Vim, how do I break a line of text with a newline? For
I want to use VIM to edit reStuctured text documents in a number of
I want Vim 's completion menu to work more like the one in Visual

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.