bufsurf


Ⅰ. 插件描述

Vim plugin that enables surfing through buffers based on viewing history per window.

Ⅱ. 基本信息

创建日期:  2010-09-15
使用用户:  75
Github星:  54
插件作者:  Ton van den Heuvel

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

vim-bufsurf

This plugin enables surfing through buffers based on a viewing history per
window.

When editing multiple files oftentimes it would be nice to be able to go back
and forth between the last edited files, just like a web browser allows the
user to navigate web pages forward and backward in history. The standard
:bn(ext) and :bp(revious) Vim commands allow to switch between next and
previous buffers respectively, but they do no take into account the history of
the last used files. Instead, they use the order in which the files were
opened, which can cause confusion in case the user expects to navigate forward
and backwards in history. For example, in case the user opened the files A,
B, and C in the following order:

  1. A
  2. B
  3. C

and the navigation history would be:

  1. A
  2. B
  3. C
  4. B

then :bp(revious) in the last buffer (containing B) would open up buffer
A, where C is preferable. This plugin supplies the user with the commands
:BufSurfForward and :BufSurfBack to navigate buffers forwards and backwards
according to the navigation history.

添加新评论