vim-sbd


Ⅰ. 插件描述

Smart buffer closing. Mirror of repo by Orphée Lafond-Lummis.

Ⅱ. 基本信息

创建日期:  2012-02-03
使用用户:  9
Github星:  17
插件作者:  Caleb Spare

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# NOTE

This is a mirror of github.com/orftz/sbd.vim. That github account appears to have been deleted.

sbd.vim

Flattr this

Close buffers smartly.

Because Vim's vanilla buffer closing/deletion becomes painful as soon as you start working with multiple buffers and windows.

sbd allows you to close buffers while leaving your window layout intact. As a bonus, deleting a special buffer (e.g. quickfix, help, directory, scratch, etc) will automatically close the window holding it. Making these special buffers easier to deal with.

Installation

If you don't have a preferred installation method, I recommend installing pathogen, and run:

cd ~/.vim/bundle
git clone git://github.com/orftz/sbd.vim.git

Then, add the following to your vimrc, as-is or tweaked to your taste:

nnoremap <silent> <leader>bd    :Sbd<CR>
nnoremap <silent> <leader>bdm   :Sbdm<CR>

:Sbd closes the buffer normally, while :Sbdm closes the buffer disregarding if it has unsaved changes or not.

Once help tags have been generated, you can view the manual with :help sbd.vim.

Enjoy.

Changelog

1.1.1 — NOTE: I may have screwed up a merge in 1.1.0. If you're running in such a problem, simply re-install the plugin. Sorry for the fuss.

1.1.0 — DeleteBuffer() modes

  • modeNormal used via :Sbd does the normal thing
  • modeCloseModified used via :Sbdm closes the buffer even if it's modified (has unsaved changes)

1.0.3 — Better README

1.0.2 — Flattr button

1.0.1 — Documentation and README clarification

1.0.0 — Initial stable release

License (ISC)

© 2012 Orphée Lafond-Lummis <orftz@orftz.com>

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

添加新评论