Skip to content

Commit 13495ab

Browse files
committed
Merge pull request rking#77 from thebinarypenguin/auto-preview
Add auto-preview feature
2 parents 29b7dd8 + c1ba93d commit 13495ab

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

plugin/ack.vim

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ function! s:Ack(cmd, args)
8181
exec "nnoremap <silent> <buffer> H <C-W><CR><C-W>K<C-W>b"
8282
exec "nnoremap <silent> <buffer> v <C-W><CR><C-W>H<C-W>b<C-W>J<C-W>t"
8383
exec "nnoremap <silent> <buffer> gv <C-W><CR><C-W>H<C-W>b<C-W>J"
84+
85+
" If auto preview in on, remap j and k keys
86+
if exists("g:ackpreview")
87+
exec "nnoremap <silent> <buffer> j j<CR><C-W><C-W>"
88+
exec "nnoremap <silent> <buffer> k k<CR><C-W><C-W>"
89+
endif
8490
endif
8591

8692
" If highlighting is on, highlight the search keyword.

0 commit comments

Comments
 (0)