The Silver Searcher

I'm a search don't sort kind of guy, so when I was trying to make sense of gigabytes of XML files I instinctively reached for ack. Unfortunately ack struggled with this unholy corpus of legacy drivel. Overhearing my dismay a coworker asked "why aren't you using Silver Searcher?"

It turns out that The Silver Search made light work the XML files, so I looked at how to plug it into Vim. The command-line parameters are compatible with Ack, so all I had to do was change the ackprg:

let g:ackprg = 'ag --nogroup --nocolor --column'

If you want to use the same plugin as me, it's mileszs / ack.vim.

The Silver Searcher's documentation claims it's 3-5 times faster than Ack, and in practice I've found this to be true. It's visibly faster on the projects I'm currently working on, so I'm happy with it after a few weeks of use.

blog comments powered by Disqus