From 233d6e249f0650222677e6139644e2a5397f444e Mon Sep 17 00:00:00 2001 From: Kevin Date: Mon, 9 Dec 2013 18:01:48 +0800 Subject: [PATCH] Add column info to the grepformat,let it jump to the exact column. --- plugin/ack.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugin/ack.vim b/plugin/ack.vim index 1aecd51..a4a09ea 100644 --- a/plugin/ack.vim +++ b/plugin/ack.vim @@ -6,14 +6,18 @@ " With MacPorts: " sudo port install p5-app-ack -let g:ackprg="ack\\ -H\\ --nocolor\\ --nogroup" +let g:ackprg="ack\\ -H\\ --nocolor\\ --nogroup\\ --column\\ " +let g:ackgrpformat="%f:%l:%c:%m" function! Ack(args) let grepprg_bak=&grepprg + let grepformat_bak=&grepformat exec "set grepprg=" . g:ackprg + exec "set grepformat=" . g:ackgrpformat execute "silent! grep " . a:args botright copen let &grepprg=grepprg_bak + let &grepformat=grepformat_bak exec "redraw!" endfunction