Ⅰ. 插件描述
Switch buffers using an incremental searchⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/incbufswitch-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/incbufswitch-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/incbufswitch-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/incbufswitch.vim
Ⅳ. 文档说明
Switch to a different buffer in the current window by incrementally typing the name.
Usage:
(1) Define a normal key mapping to :IncBufSwitch or leave the default of <C-S>
(2) In normal mode, start typing the name of the buffer you want to switch to.
(3) Press <BS> if make an error
(4) Press <TAB> to find the next matching buffer
(5) Press either <CR> or <ESC> when you are done
For example, if you have the following files in memory:
foo.c, bar.c, baz.c, structs.h
and you are currently editing foo.c.
Example 1: You press <C-S> and type s<CR>. You are now editing structs.h.
Example 2: You press <C-S> and type b. Buffer switches to bar.c. If you press <TAB> baz.c enters the window.
The project I work on has a LOT of files. It is not uncommon to have 20-30 files in memory at any given time. I find that this allows me to switch amongst them much faster.
Let me know of any ideas or problems.