Ⅰ. 插件描述
Move buffers across multiple instances of Vim like modern browser(Google Chrome, Firefox)'s tabⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'tyru/transbuffer-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'tyru/transbuffer-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'tyru/transbuffer-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/tyru/transbuffer.vim
Ⅳ. 文档说明
TransBuffer.vim
Move buffers across multiple instances of Vim like modern browser(Google Chrome, Firefox)'s tab.
Introduction
Two vim instances are running.
--------- ---------
| GVIM1 | | GVIM2 |
--------- ---------
and GVIM1 is editing hello.txt.
The next two commands will move
hello.txt buffer to GVIM2. (and GVIM1 buffer is closed)
" Execute this command on GVIM2.
:TransGetBuffer GVIM1 hello.txtor
" Execute this command on GVIM1.
" (you can omit "hello.txt" argument
" if current buffer is "hello.txt")
:TransPutBuffer GVIM2 hello.txtYou can complete arguments by pressing wildchar.
If you do not change wildchar in .vimrc,<Tab> is the default key for wildchar.
" 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:
:TransPutBuffer +NEWVIMwill run a new Vim instance whose v:servername is "NEWVIM".
License
NEW BSD
Author
tyru <tyru.exe@gmail.com>