mirror of
https://github.com/gryf/.vim.git
synced 2025-12-18 12:00:30 +01:00
Added branch pathogen
This commit is contained in:
50
bundle/ack/plugin/ack.vim
Normal file
50
bundle/ack/plugin/ack.vim
Normal file
@@ -0,0 +1,50 @@
|
||||
" 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! Ack(args)
|
||||
let grepprg_bak=&grepprg
|
||||
exec "set grepprg=" . g:ackprg
|
||||
execute "silent! grep " . a:args
|
||||
botright copen
|
||||
let &grepprg=grepprg_bak
|
||||
exec "redraw!"
|
||||
endfunction
|
||||
|
||||
function! AckAdd(args)
|
||||
let grepprg_bak=&grepprg
|
||||
exec "set grepprg=" . g:ackprg
|
||||
execute "silent! grepadd " . a:args
|
||||
botright copen
|
||||
let &grepprg=grepprg_bak
|
||||
exec "redraw!"
|
||||
endfunction
|
||||
|
||||
function! LAck(args)
|
||||
let grepprg_bak=&grepprg
|
||||
exec "set grepprg=" . g:ackprg
|
||||
execute "silent! lgrep " . a:args
|
||||
botright lopen
|
||||
let &grepprg=grepprg_bak
|
||||
exec "redraw!"
|
||||
endfunction
|
||||
|
||||
function! LAckAdd(args)
|
||||
let grepprg_bak=&grepprg
|
||||
exec "set grepprg=" . g:ackprg
|
||||
execute "silent! lgrepadd " . a:args
|
||||
botright lopen
|
||||
let &grepprg=grepprg_bak
|
||||
exec "redraw!"
|
||||
endfunction
|
||||
|
||||
command! -nargs=* -complete=file Ack call Ack(<q-args>)
|
||||
command! -nargs=* -complete=file AckAdd call AckAdd(<q-args>)
|
||||
command! -nargs=* -complete=file LAck call LAck(<q-args>)
|
||||
command! -nargs=* -complete=file LAckAdd call LAckAdd(<q-args>)
|
||||
Reference in New Issue
Block a user