0

When I open a file in gvim from terminal using gvim abc.cpp, unlike gedit it is opening in new gvim window. Can anyone suggest some way to open new file in a new tab in previously opened gvim window? I couldn't find any information regarding this on searching. I am using Ubuntu 12.04. Vim version is 7.3

Shashwat Kumar
  • 5,159
  • 2
  • 30
  • 66
  • possible duplicate of [Open files in existing Gvim in multiple (new) tabs](http://stackoverflow.com/questions/894811/open-files-in-existing-gvim-in-multiple-new-tabs) – Ingo Karkat Mar 11 '14 at 13:53
  • 2
    Stack Overflow immediately finds multiple duplicates and shows then in the _Related_ column on the right: also [GVim: Open in a new tab](http://stackoverflow.com/questions/3574446/gvim-open-in-a-new-tab?rq=1) – Ingo Karkat Mar 11 '14 at 13:54
  • Oh sorry, the word 'existing' didn't click to me while searching. I was repeatedly using 'previous' for finding answer. Thank you. – Shashwat Kumar Mar 11 '14 at 13:57
  • `:h remote` `:h --servername` – Kent Mar 11 '14 at 13:59
  • +1 @IngoKarkat, I didn't notice the column. I just gave it a try by pressing "Ask Question" and filled the OP's question, some related useful(read duplicated) topics were listed as well. ;) – Kent Mar 11 '14 at 14:01

1 Answers1

0
gvim --remote-silent abc.cpp

The -silent prevents an error message from showing if there is not already a instance of GVim running

Brett Y
  • 7,171
  • 1
  • 28
  • 42