Skip to content

Commit

Permalink
By default ignore files listed on wildignore
Browse files Browse the repository at this point in the history
  • Loading branch information
kassio committed Mar 12, 2014
1 parent d8b1f03 commit fbe476c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
11 changes: 11 additions & 0 deletions doc/ack.txt
Expand Up @@ -87,6 +87,17 @@ Example:
\ "ack -H --nocolor --nogroup --column --smart-case --follow"
<

*g:ack_wildignore*
g:ack_wildignore
Default: 1

Use wildignore list to ignore files on ack search.

Example:
>
let g:ack_wildignore = 0
<

*g:ack_autoclose*
g:ack_autoclose
Default: 0
Expand Down
10 changes: 10 additions & 0 deletions plugin/ack.vim
Expand Up @@ -13,6 +13,16 @@ if !exists("g:ackprg")
let g:ackprg = s:ackcommand." -H --nocolor --nogroup --column"
endif

if !exists("g:ack_wildignore")
let g:ack_wildignore = 1
endif

if g:ack_wildignore
let s:ignore = substitute(&wildignore, "\*", '--ignore-file=match:', "g")
let s:ignore = join(split(s:ignore, ","), " ")
let g:ackprg = g:ackprg . " " . s:ignore
end

" this works despite the other options given for ack in g:ackprg
let s:ackprg_version = eval(matchstr(system(g:ackprg . " --version"), '[0-9.]\+'))

Expand Down

0 comments on commit fbe476c

Please sign in to comment.