Vim: use 'grepprg' in lieu of a custom function for Ack
Vim: use 'grepprg' in lieu of a custom function for Ack

While browsing on GitHub saw the `--column` parameter to `ack` in
somebody's ~/.vimrc[*]. This was a nice surprise as I hadn't known that
Vim's quickfix window could pay attention to the column information.

I could easily add this `--column` param to my existing set-up, but I
figured I'd also take the opportunity to try running `ack` via the
`'grepprg'` mechanism instead.

On the plus side, it's possible to use a `QuickFixCmdPost` autocmd to
automate the display of the quickfix listing. (I'm not sure whether it's
really necessary to also handle the location list, as I've never used
one before, but I think it's worth trying; see :h location-list for more
info on these.)

Another aspect which I'm not sure is a benefit or a disadvantage, this
set-up no longer auto-jumps to the first match. I guess the only way to
find out is to try it.

On the down side: the new technique has a noticeable flicker.

[*]: https://raw.github.com/sfowler/vim-config/master/.vimrc

Signed-off-by: Wincent Colaiuta <c76ac2e9cd86441713c7dfae92c451f3e6d17fdc@wincent.com>

wincent/wincent,wincent/wincent,wincent/wincent,wincent/wincent,wincent/wincent,wincent/wincent,wincent/wincent,wincent/wincent