561ef889872d

sub: vim/ack
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Tue, 16 Nov 2010 16:52:16 -0500
parents 90083699bcd2
children 9b4c2bff117e
branches/tags (none)
files vim/bundle/ack/doc/ack.txt vim/bundle/ack/doc/tags vim/bundle/ack/plugin/ack.vim

Changes

--- a/vim/bundle/ack/doc/ack.txt	Mon Nov 15 17:15:57 2010 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-*ack.txt*   Plugin that integrates ack with Vim
-
-==============================================================================
-Author:  Antoine Imbert <antoine.imbert+ackvim@gmail.com>         *ack-author*
-License: Same terms as Vim itself (see |license|)
-
-==============================================================================
-INTRODUCTION                                                             *ack*
-
-This plugin is a front for the Perl module App::Ack.  Ack can be used as a
-replacement for grep.  This plugin will allow you to run ack from vim, and
-shows the results in a split window.
-
-:Ack [options] {pattern} [{directory}]                                  *:Ack*
-
-    Search recursively in {directory} (which defaults to the current
-    directory) for the {pattern}.  Behaves just like the |:grep| command, but
-    will open the |Quickfix| window for you.
-
-:AckAdd [options] {pattern} [{directory}]                            *:AckAdd*
-
-    Just like |:Ack| + |:grepadd|.  Appends the |quickfix| with the results
-
-:AckFromSearch [{directory}]                                  *:AckFromSearch*
-
-    Just like |:Ack| but the pattern is from previous search.
-
-:LAck [options] {pattern} [{directory}]                                *:LAck*
-
-    Just like |:Ack| + |:lgrep|.  Searches, but opens in |location-list|
-
-:LAckAdd [options] {pattern} [{directory}]                          *:LAckAdd*
-
-    Just like |:Ack| + |:lgrepadd|.  Searches, but appends results to
-    |location-list|
-
-Files containing the search term will be listed in the split window, along
-with the line number of the occurrence, once for each occurrence.  <Enter> on
-a line in this window will open the file, and place the cursor on the matching
-line.
-
-See http://search.cpan.org/~petdance/ack/ack for more information.
--- a/vim/bundle/ack/doc/tags	Mon Nov 15 17:15:57 2010 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-:Ack	ack.txt	/*:Ack*
-:AckAdd	ack.txt	/*:AckAdd*
-:AckFromSearch	ack.txt	/*:AckFromSearch*
-:LAck	ack.txt	/*:LAck*
-:LAckAdd	ack.txt	/*:LAckAdd*
-ack	ack.txt	/*ack*
-ack-author	ack.txt	/*ack-author*
-ack.txt	ack.txt	/*ack.txt*
--- a/vim/bundle/ack/plugin/ack.vim	Mon Nov 15 17:15:57 2010 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-" NOTE: You must, of course, install the ack script
-"       in your path.
-" On Ubuntu:
-"   sudo apt-get install ack-grep
-"   ln -s /usr/bin/ack-grep /usr/bin/ack
-" With MacPorts:
-"   sudo port install p5-app-ack
-
-let g:ackprg="ack -H --nocolor --nogroup"
-
-function! s:Ack(cmd, args)
-    redraw
-    echo "Searching ..."
-
-    let grepprg_bak=&grepprg
-    try
-        let &grepprg=g:ackprg
-        silent execute a:cmd . " " . a:args
-    finally
-        let &grepprg=grepprg_bak
-    endtry
-
-    if a:cmd =~# '^l'
-        botright lopen
-    else
-        botright copen
-    endif
-    redraw!
-endfunction
-
-function! s:AckFromSearch(cmd, args)
-    let search =  getreg('/')
-    " translate vim regular expression to perl regular expression.
-    let search = substitute(search,'\(\\<\|\\>\)','\\b','g')
-    call s:Ack(a:cmd, '"' .  search .'" '. a:args)
-endfunction
-
-command! -bang -nargs=* -complete=file Ack call s:Ack('grep<bang>',<q-args>)
-command! -bang -nargs=* -complete=file AckAdd call s:Ack('grepadd<bang>', <q-args>)
-command! -bang -nargs=* -complete=file AckFromSearch call s:AckFromSearch('grep<bang>', <q-args>)
-command! -bang -nargs=* -complete=file LAck call s:Ack('lgrep<bang>', <q-args>)
-command! -bang -nargs=* -complete=file LAckAdd call s:Ack('lgrepadd<bang>', <q-args>)