Ⅰ. 插件描述
Vim plugin: A framework to open a file by contextⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'kana/gf-user'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'kana/gf-user'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'kana/gf-user'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/kana/vim-gf-user
Ⅳ. 文档说明
gf-user is a Vim plugin to provide a framwork to extend |gf|. Though |gf|is one of the most useful commands in Vim, it has the following problems:- The file to be opened is based on the word under the cursor.- It's not possible to specify the cursor position for the opened file.Sometimes you might wish |gf| used more text around the cursor to detect thefile to be opened and the initial cursor position. For example,- While reading output from diff(1), go to the hunk under the cursor.- While editing files for an MVC framework, go to the view file corresponding to an action of the controller under the cursor. Though it's not hard to implement each extension, it's a bit troublesome tosynthesize all extensions. |gf-user| provides a framework for the extensions.Requirements:- Vim 7.3 or laterLatest version:http://github.com/kana/vim-gf-userDocument in HTML format:http://kana.github.com/config/vim/gf-user.html