Tuesday, 2 September 2014

Open file in existing gvim in new tab

We know that gvim -p can be used to open multiple files together in different tabs in gvim. However if you want to open a file in a new tab in the existing gvim session "gvim -p" wont do any good. For that we can use client server concept available in gvim. Add the following line in "~/.bashrc" file and you are good to go!

alias gvim='gvim --servername gViM --remote-tab'

Now you can simply give gvim [file(s)] to open in new tab in the existing gvim session!

No comments:

Post a Comment