Ⅰ. 插件描述
Find (git grep) references to the rails view partial you're viewingⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'skwp/vim-git-grep-rails-partial'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'skwp/vim-git-grep-rails-partial'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'skwp/vim-git-grep-rails-partial'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/skwp/vim-git-grep-rails-partial
Ⅳ. 文档说明
vim-git-grep-rails-partial
This tiny plugin quite simply finds all the references to the file you're currently viewing.
It's primarily designed to be used with rails partials, which look like _some_partial.rhtml
or _some_partial.haml. When viewing such a file, invoking GitGrepCurrentPartial will
find files containing strings such as 'some_partial'
- Requires: https://github.com/tjennings/git-grep-vim
- Install: clone into ~/.vim/bundle if using pathogen
- Usage:
:GitGrepCurrentPartial
- Recommended key mapping:
nnoremap <silent> P :GitGrepCurrentPartial<CR>
- Original blog post: http://yanpritzker.com/2011/10/31/vimrailsgit-find-references-to-current-partial/
- Please enjoy responsibly.