ag.vim icon indicating copy to clipboard operation
ag.vim copied to clipboard

Option to ignore files from the 'wildignore' option

Open losingkeys opened this issue 10 years ago • 8 comments

Plugins like ctrlp and vinegar take into account the 'wildignore' option, which makes them show more relevant results more quickly. I think we should add an option for this, and turn it on by default (though the default is probably up for discussion).

losingkeys avatar Aug 08 '14 18:08 losingkeys

I would love this. How are others getting around polluting their results with logs, temp files, etc.?

rapind avatar Aug 18 '14 20:08 rapind

the_silver_searcher takes into account .gitignore files and .hgignore files. I think there are still some issues around paths like log/ not being ignored when they should be. The reason to add this (IMO) is because it makes this plugin more consistent with other vim plugins (like vim-vinegar and ctrlp.vim).

On Mon, Aug 18, 2014 at 01:57:11PM -0700, Dave Rapin wrote:

I would love this. How are others getting around polluting their results with logs, temp files, etc.?


Reply to this email directly or view it on GitHub: https://github.com/rking/ag.vim/issues/67#issuecomment-52553938

losingkeys avatar Aug 18 '14 23:08 losingkeys

That was super helpful thanks. Sorry to sidetrack the thread.

rapind avatar Aug 19 '14 00:08 rapind

Not at all, comments welcome :)

On Mon, Aug 18, 2014 at 05:15:38PM -0700, Dave Rapin wrote:

That was super helpful thanks. Sorry to sidetrack the thread.


Reply to this email directly or view it on GitHub: https://github.com/rking/ag.vim/issues/67#issuecomment-52574668

losingkeys avatar Aug 19 '14 00:08 losingkeys

Oh please, oh please, somebody implement this. This would be especially useful when having a ./vendor directory in a project, where ag returns lots of "useless" results. :+1:

jottr avatar Oct 28 '14 14:10 jottr

I'm using project specific .vimrc's with

let g:agprg='ag -S --nocolor --nogroup --column --ignore node_modules --ignore "./public/stylesheets/*"'

Ideally you'd set stuff before --ignore parameters in .vimrc and concatenate the ignores.

raine avatar Dec 08 '14 13:12 raine

it should be possible to drop .ignore file with the pattern or even .agignore in your $HOME folder

webduvet avatar Apr 23 '18 13:04 webduvet

making like this in my .vimrc solve my problem:

let s:ag_options = ' --one-device --skip-vcs-ignores --smart-case --ignore node_modules'

krehwell avatar Sep 25 '20 18:09 krehwell