Skip to content

Commit

Permalink
Added 'O' Shortcut
Browse files Browse the repository at this point in the history
Added 'O' (Upper case 'o') shortcut to open the file and close
the quickfix window.
  • Loading branch information
imtapps authored and kassio committed Mar 11, 2014
1 parent 6bfa5a1 commit 40cf9c8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ Some characters have special meaning, and need to be escaped your search pattern
In the quickfix window, you can use:

o to open (same as enter)
O to open and close quickfix window
go to preview file (open but maintain focus on ack.vim results)
t to open in new tab
T to open in new tab silently
Expand Down
2 changes: 2 additions & 0 deletions doc/ack.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ The following keyboard shortcuts are available in the quickfix window:

o open file (same as enter).

O open file and close quickfix window.

go preview file (open but maintain focus on ack.vim results).

t open in a new tab.
Expand Down
3 changes: 2 additions & 1 deletion plugin/ack.vim
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ function! s:Ack(cmd, args)
exec "nnoremap <silent> <buffer> t <C-W><CR><C-W>T"
exec "nnoremap <silent> <buffer> T <C-W><CR><C-W>TgT<C-W><C-W>"
exec "nnoremap <silent> <buffer> o <CR>"
exec "nnoremap <silent> <buffer> go <CR><C-W><C-P>"
exec "nnoremap <silent> <buffer> O <CR><C-W><C-W>:ccl<CR>"
exec "nnoremap <silent> <buffer> go <CR><C-W><C-W>"
exec "nnoremap <silent> <buffer> h <C-W><CR><C-W>K"
exec "nnoremap <silent> <buffer> H <C-W><CR><C-W>K<C-W>b"
exec "nnoremap <silent> <buffer> v <C-W><CR><C-W>H<C-W>b<C-W>J<C-W>t"
Expand Down

0 comments on commit 40cf9c8

Please sign in to comment.