bufmru.vim


Ⅰ. 插件描述

switch to a most recently used buffer quickly

Ⅱ. 基本信息

创建日期:  2008-08-18
使用用户:  10
Github星:  8
插件作者:  Andy Wokula

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

Switch between MRU buffers from the current session. Like CTRL-^, but reach
more buffers (and maintain only one global list, not one list per window).

Usage:

  Press  <Space>  to show the most recently used buffer and enter Bufmru mode.

  In Bufmru mode:
  Press  f  or  b  (forward/backward) to reach more MRU buffers.
  Press  e  or  <Enter>  to accept the current choice.
  Press  q  or  <Esc>  to quit the mode and to go back to the start buffer
  Press  y  to copy a file name

Configuration:
  :let g:bufmru_switchkey = "<Space>"
      (checked once) Key to enter Bufmru mode.

  :let g:bufmru_confclose = 0
      (always) Use :confirm (1) when abandoning a modified buffer.
      Otherwise (0, default) you'll get an error message, unless 'hidden'
      is set.

  :let g:bufmru_bnrs = []
      (always) The internal stack of buffer numbers.  Normally, you'll
      leave this alone, but you can manually add or remove buffer numbers
      or initialize the list.  Don't worry about wrong numbers.

  :let g:bufmru_read_nummarks = 0
      (once) Put the number mark '0 ... '9 buffers in g:bufmru_bnrs.  This adds
      buffers to the buffer list!

wildmenu version only:

  g:bufmru_wildmenu   (dictionary, initially not defined)
      (always) Instance of autoload/wildmenu.vim to show buffer names in a
      wildmenu-like list.  If not defined, bufmru tries to load the autoload
      script.  If that fails the value becomes empty ({}) -- and bufmru
      quite unusable.

  :let g:bufmru_wilditems = "bufnr,shortpath"
      (always) How to display entries in the "wildmenu":
      "bufnr"         with prepended buffer number
      "shortpath"     with pathshorten() applied to the bufname()
      There is no error message for wrong items.

splashbufs version only:

  :let g:bufmru_lazy_filetype = 0
      (checked always) If 1, do lazy filetype detection when going through
      the buffers with f and b.  Not used if 'hidden' is set.

special buffer: 'buftype' not empty or 'previewwindow' set

Related:
http://vim.wikia.com/wiki/Easier_buffer_switching

Where it began:
http://groups.google.com/group/vim_use/msg/adb4f35772ecbcbe

Another MRU buffers script!  But it requires Ruby (that I haven't installed):
LustyJuggler vimscript #2050

添加新评论