of.vim


Ⅰ. 插件描述

Switch between open files / Find files by parital name (Similar to TM's Cmd-T)

Ⅱ. 基本信息

创建日期:  2007-10-12
使用用户:  1
Github星:  1
插件作者:  Ethan McCreadie

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

This script works under CLI Vim (not gvim) and provides a curses interface for switching between / opening files simlar to TextMate's Cmd-T command.  It requires Vim to be compiled with Ruby bindings, and if you want it to keep a history, also for Ruby's sqlite3 bindings to be installed (it makes a db in your home directory, .of.db, where it stores info on recently opened files and preferred shortcuts for certain files).  To open a file called accounts_controller.php, you could simply call OF (I bind it to Alt-T) and type in ac -- a list of files under your working directory come up that have these two letters in any order.  Move up and down with arrows or ^P/^N, scroll with your mouse, or click/enter to select.  Escape gets you out.  This is a work in progress.  The code has no comments and needs to be cleaned up, but it does what I want it to for now, and maybe what you want.

This may be a little slow if run from a directory with a huge amount of files.  I usually start it from the base of whatever project I'm working on.

添加新评论