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?>
The solutions above don't launch the gvim server on first execution, so I use:
ANS=`pgrep -fx "$VIM"` # Launch server if needed if [[ ! $ANS ]]; then $VIM fi # Now open the file if [[ $1 ]]; then $VIM --remote-tab "$@" fi
modified from https://stackoverflow.com/a/15335004/214686