wiki:VimGlimpse

VimGlimpse

 Glimpse is a powerful indexing and query system, free for personal use.

VimGlimpse is a basic Glimpse interface within Vim, based on a  Vim Tip from Jean-Rene David.

VimGlimpse retains normal Vim :grep functionality, and provides additional Glimpse features outside of what grepprg can allow. By default, VimGlimpse only searches within your current working directory, making it ideal for near instantaneous searches across a project.

Examples

:Glimpse porksausage

Recursively search for the phrase porksausage from the current working directory.

:Glimpse needle haystack.h$

Finds all needles in all haystack.h's files.

:let g:glimpseFlags = "-iny -2"	
:Glimpse Anestesiology html

Outputs all occurrences of Anestesiology with two errors in files with html somewhere in their full name.

:Glimpse windsurfing;Arizona mail;1993

Finds all lines containing windsurfing and Arizona in all files having `mail' and '1993' somewhere in their full name.

Downloads

You can download the latest build directly from  Vim's web site, or if you're feeling adventurous you can build it yourself from  here.

Installation

VimGlimpse requires an installation of Glimpse (of course), and the  VimBall packager. Install the VimBall plugin (vimscript #1502) if you don't already have it.

Then, open the glimpse.vba file within vim, and run the following command:

 :so %

VimBall takes care of putting the files in the right locations and automatically updating the help index.

Development

You can also check out the source via  Mercurial from the following uri:

% hg clone http://code.martini.nu/vim-stuff/

Documentation

Once installed, Glimpse has built-in help. Access it via :help glimpse.