friendly-grep.vim


Ⅰ. 插件描述

vim plugin to make vimgrep friendly

Ⅱ. 基本信息

创建日期:  2013-06-02
使用用户:  1
Github星:  1
插件作者:  akira hamada

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/akira-hamada/friendly-grep.vim

Ⅳ. 文档说明

friendly-grep.vim

you can grep easily with this plugin.

demo movie

Installation

if you use vundle, execute :BundleInstall after adding the following line into your .vimrc.

  Bundle 'akira-hamada/friendly-grep.vim'

or Download files and put them into your plugin and autoload directory.

How to Use

just execute the following command.

:FriendlyGrep

I recommend you add shortcut for the function into your .vimrc like this.

nnoremap <C-g> <ESC>:FriendlyGrep<CR>

Options

  let g:friendlygrep_target_dir = 'path/to/dir/you/often/grep/'
  " You can set directory path you grep friquently.

  let g:friendlygrep_recursively = 1
  " if you set this option 1, you can grep recursively always without a prompt for you.
  " The default value is null (ask you recursive option everytime you grep)

  let g:friendlygrep_display_result_in = 'tab'
  " if you set 'tab' for this option, the plugin opens result in newtab.
  " you can set 'split', 'vsplit' or 'quickfix' as value.
  " The default value is 'split' (open results in top splited window)

Vimgrep Tips

You might want to add the following shortcuts to jump around the grep result into your .vimrc.

  nnoremap <LEFT> :cprevious<CR>
  nnoremap <RIGHT> :cnext<CR>
  nnoremap <UP> :<C-u>cfirst<CR>
  nnoremap <DOWN> :<C-u>clast<CR>

添加新评论