Move buffers across multiple instances of Vim like modern browser(Google Chrome, Firefox)'s tab.
Two vim instances are running.
--------- --------- | GVIM1 | | GVIM2 | --------- ---------
and GVIM1 is editing
The next two commands will move hello.txt buffer to GVIM2. (and GVIM1 buffer is closed)
" Execute this command on GVIM2. :TransGetBuffer GVIM1 hello.txt
" Execute this command on GVIM1. " (you can omit "hello.txt" argument " if current buffer is "hello.txt") :TransPutBuffer GVIM2 hello.txt
You can complete arguments by pressing
If you do not change
wildchar in .vimrc,
<Tab> is the default key for
" If you press <Tab> here, " you can complete Vim instances currently running. :TransPutBuffer
" If you press <Tab> here, " you can complete buffers currently editing on GVIM1. " (please remember you can use <C-d> to list up all candidates) :TransPutBuffer GVIM1
If you want to open a current buffer on a new Vim instance:
will run a new Vim instance whose
v:servername is "NEWVIM".