Fdgrep


Ⅰ. 插件描述

Find a function declaration matching a given pattern

Ⅱ. 基本信息

创建日期:  2009-03-13
使用用户:  1
Github星:  1
插件作者:  Alex Esplin

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

This is a script that uses a grep-like regex to find a function declaration in the current file/buffer that matches a given regular expression.

If called like: Fdgrep(-1) the function will ask the user for a pattern to search for.  It will then search the current file buffer for function declarations that contain the given pattern.  If no pattern is given, it will prompt the user again.  If no pattern is given the second time, it will do a search that should match any function declaration.

If called like: Fdgrep(0) the function will ask search for the last-used pattern (like hitting n after a normal search). If there is no last-used pattern in memory it will prompt the user for a pattern, which can be ignored as stated above to match any function declaration.

This will work with most C, C++, Objective-C, and Python function declarations that I have seen in my own code or at my job (we have a very large C codebase).

添加新评论