Permalink
Browse files

Jump to the exact location of the search result.

Original changeset by airblade: http://github.com/airblade/ack.vim
  • Loading branch information...
1 parent 95dcc4a commit a3f8d366ce75756ae64a80edc70ad6cfc6c612f8 Damien Le Berrigaud committed Mar 24, 2010
Showing with 4 additions and 1 deletion.
  1. +4 −1 plugin/ack.vim
View
@@ -10,19 +10,22 @@
" Location of the ack utility
if !exists("g:ackprg")
- let g:ackprg="ack -H --nocolor --nogroup"
+ let g:ackprg="ack -H --nocolor --nogroup --column"
endif
function! s:Ack(cmd, args)
redraw
echo "Searching ..."
let grepprg_bak=&grepprg
+ let grepformat_bak=&grepformat
try
let &grepprg=g:ackprg
+ let &grepformat="%f:%l:%c:%m"
silent execute a:cmd . " " . a:args
finally
let &grepprg=grepprg_bak
+ let &grepformat=grepformat_bak
endtry
if a:cmd =~# '^l'

0 comments on commit a3f8d36

Please sign in to comment.