Closed rking closed 11 years ago
@rking just put following in your .vimrc:
let g:ackprg = 'ag --nogroup --nocolor --column'
Works fine for me.
I tried to use ag instead of ack with activating the config from @rking and I tried also the config with --vimgrep but whenever I activate it, it finds nothing. When I undo my changes and use ack instead it works fine. Ag works fine from the command line, so I don't see where the problem could be. Any tips, how I could find out, why I get no search results with using ag in VIM?
@janbaer When enabling let g:ackprg = 'ag --vimgrep'
and saying you get no results, are you running it from a project with a version control system?
Common problem: ag walks up the directory structure looking for files like .gitignore
and tries to use them; if your home directory is a Git repo (for your personal config files) that ignores everything not explicitly/forcefully added, then you run ag
in some subdirectory of your home dir that is not a VCS repo itself, you'll be implicitly ignoring everything. Try adding --skip-vcs-ignores
or --unrestricted
to debug.
I'm not sure why, but it's working now, aaaand it's blazing fast...
What do you think about preferring
ag
if it is installed?(Or, perhaps we could add an
:Ag
command?)I profiled it and it's a bazillion times faster.