if exists('g:loaded_ack') finish endif if !exists("g:ack_default_options") let g:ack_default_options = " -s -H --nocolor --nogroup --column" endif " Location of the ack utility if !exists("g:ackprg") if executable('ack') let g:ackprg = "ack" elseif executable('ack-grep') let g:ackprg = "ack-grep" else finish endif let g:ackprg .= g:ack_default_options endif if !exists("g:ack_apply_qmappings") let g:ack_apply_qmappings = !exists("g:ack_qhandler") endif if !exists("g:ack_apply_lmappings") let g:ack_apply_lmappings = !exists("g:ack_lhandler") endif let s:ack_mappings = { \ "t": "T", \ "T": "TgTj", \ "o": "", \ "O": "pc", \ "go": "p", \ "h": "K", \ "H": "Kb", \ "v": "HbJt", \ "gv": "HbJ" } if exists("g:ack_mappings") let g:ack_mappings = extend(s:ack_mappings, g:ack_mappings) else let g:ack_mappings = s:ack_mappings endif if !exists("g:ack_qhandler") let g:ack_qhandler = "botright copen" endif if !exists("g:ack_lhandler") let g:ack_lhandler = "botright lopen" endif if !exists("g:ackhighlight") let g:ackhighlight = 0 endif if !exists("g:ack_autoclose") let g:ack_autoclose = 0 endif if !exists("g:ack_autofold_results") let g:ack_autofold_results = 0 endif command! -bang -nargs=* -complete=file Ack call ack#Ack('grep', ) command! -bang -nargs=* -complete=file AckAdd call ack#Ack('grepadd', ) command! -bang -nargs=* -complete=file AckFromSearch call ack#AckFromSearch('grep', ) command! -bang -nargs=* -complete=file LAck call ack#Ack('lgrep', ) command! -bang -nargs=* -complete=file LAckAdd call ack#Ack('lgrepadd', ) command! -bang -nargs=* -complete=file AckFile call ack#Ack('grep -g', ) command! -bang -nargs=* -complete=help AckHelp call ack#AckHelp('grep', ) command! -bang -nargs=* -complete=help LAckHelp call ack#AckHelp('lgrep', ) command! -bang -nargs=* AckWindow call ack#AckWindow('grep', ) command! -bang -nargs=* LAckWindow call ack#AckWindow('lgrep', ) let g:loaded_ack = 1 " vim:set et sw=2 ts=2 tw=78 fdm=marker