ctrlp_bdelete.vim


Ⅰ. 插件描述

An extension to ctrlp.vim for deleting open buffers

Ⅱ. 基本信息

创建日期:  2014-05-09
使用用户:  63
Github星:  58
插件作者:  Chris Corbyn

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'd11wtq/ctrlp-bdelete-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'd11wtq/ctrlp-bdelete-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'd11wtq/ctrlp-bdelete-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/d11wtq/ctrlp_bdelete.vim

Ⅳ. 文档说明

# ctrlp_bdelete.vim

The ctrlp.vim plugin for Vim does not provide a way to delete open buffers and
there are no plans to add this functionality.

The author of ctrlp.vim, however, provided the basis
of an extension to ctrlp.vim
that users could drop into their vimrc to get this feature.

This plugin has taken that snippet and improved it to add support for marking
multiple buffers, in addition to implementing bugfixes.

Installation

The easiest way to install ctrlp_bdelete.vim is using
Vundle or
Pathogen.

You'll also need to add the following line to your ~/.vimrc:

call ctrlp_bdelete#init()

This simply adds a user setting to ctrlp itself. If you are already setting
g:ctrlp_buffer_func somewhere in your vimrc, make sure to call
ctrlp_bdelete#init() after that (this plugin won't clobber it, but you may
clobber the plugin initialization if you change g:ctrlp_buffer_func later).

Usage

Open ctrlp in buffer mode (c-p c-b), filter as needed,
navigate to a buffer you wish to close and press c-@
(c-2). The buffer will be deleted and will disappear from the
list.

You may also mark multiple buffers with c-z and then close them all
at once with a single press of c-@.

TODO

  • Fix rendering bug that causes the ctrlp pane to consume the entire window in
    some cases (sporadic).
  • Support a custom mapping instead of c-@.
  • Write documentation for Vim

添加新评论