Skip to content

Commit

Permalink
Implement highlighting of the search keyword with g:ackhighlight
Browse files Browse the repository at this point in the history
  • Loading branch information
rstacruz authored and mileszs committed Feb 28, 2011
1 parent 5a54fe5 commit a41d5d5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions plugin/ack.vim
Expand Up @@ -55,6 +55,12 @@ function! s:Ack(cmd, args)
exec "nnoremap <silent> <buffer> o <CR>"
exec "nnoremap <silent> <buffer> go <CR><C-W><C-W>"

" If highlighting is on, highlight the search keyword.
if exists("g:ackhighlight")
let @/=a:args
set hlsearch
end

redraw!
endfunction

Expand Down

0 comments on commit a41d5d5

Please sign in to comment.