Let gVim always run a single instance

后端 未结 12 694
时光说笑
时光说笑 2020-12-12 19:14

Is there a way to let gVim only run a single instance, so that when a new file is opened with it it\'s automatically opened in a new tab in the currently running instance?

12条回答
  •  误落风尘
    2020-12-12 19:33

    NOT For WINDOWS

    I use MacVim (snapshot 73).

    Add this to your .bash_profile.

    It won't generate "NO NAME" and error message.

    vi() {
    
        if [[ `mvim --serverlist` == 'VIM' ]]; then
            command mvim --remote-tab-silent "$@"
        else
            command mvim "$@"
        fi
    }
    

提交回复
热议问题