Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions autoload/ack.vim
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ endif
"-----------------------------------------------------------------------------

function! ack#Ack(cmd, args) "{{{
call ack#UpdateAckPrg()
call s:Init(a:cmd)
redraw

Expand Down
24 changes: 14 additions & 10 deletions plugin/ack.vim
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,21 @@ if !exists("g:ack_default_options")
let g:ack_default_options = " -s -H --nopager --nocolor --nogroup --column"
endif

" Location of the ack utility
if !exists("g:ackprg")
if executable('ack-grep')
let g:ackprg = "ack-grep"
elseif executable('ack')
let g:ackprg = "ack"
else
finish
function! ack#UpdateAckPrg() "{{{
" Location of the ack utility
if !exists("g:ackprg")
if executable('ack-grep')
let g:ackprg = "ack-grep"
elseif executable('ack')
let g:ackprg = "ack"
else
return
endif
let g:ackprg .= g:ack_default_options
endif
let g:ackprg .= g:ack_default_options
endif
endfunction "}}}

call ack#UpdateAckPrg()

if !exists("g:ack_apply_qmappings")
let g:ack_apply_qmappings = !exists("g:ack_qhandler")
Expand Down