diff --git a/autoload/grepper.vim b/autoload/grepper.vim index 302129e..26a1f7b 100644 --- a/autoload/grepper.vim +++ b/autoload/grepper.vim @@ -462,74 +462,15 @@ function! s:finish_up(flags) abort let w:quickfix_title = s:cmdline setlocal nowrap - nnoremap zv - nnoremap o zv - nnoremap O :let grwin=winnr()zv:exec grwin 'wincmd p'unlet grwin - nnoremap s :call open_entry('split', 1) - nnoremap S :call open_entry('split', 0) - nnoremap v :call open_entry('vsplit', 1) - nnoremap V :call open_entry('vsplit', 0) - nnoremap t gFzv - nmap T tgT - if !a:flags.switch call feedkeys("\p", 'n') endif endif echo printf('Found %d matches.', size) - if a:flags.open && a:flags.switch - echohl Comment - echon ' oO=open sS=split vV=vsplit tT=tab' - echohl NONE - endif - silent doautocmd User Grepper endfunction -" s:open_entry() {{{1 -function! s:open_entry(cmd, jump) - let swb = &switchbuf - let &switchbuf = '' - " Set a mark to find this window again in s:jump_to_qf_win. - let w:grepper_qf_win = 1 - try - if winnr('$') == 1 - execute "normal! \" - else - wincmd p - execute 'rightbelow' a:cmd - let win = s:jump_to_qf_win() - execute "normal! \" - endif - normal! zv - catch /E36/ - call s:error('E36: Not enough room') - finally - " Window numbers get reordered after creating new windows. - if !a:jump - if exists('win') && win >= 0 - execute win 'wincmd w' - else - call s:jump_to_qf_win() - endif - endif - let &switchbuf = swb - endtry -endfunction - -" s:jump_to_qf_win() {{{1 -function! s:jump_to_qf_win() abort - for win in range(1, winnr('$')) - if getwinvar(win, 'grepper_qf_win', 0) - execute win 'wincmd w' - unlet w:grepper_qf_win - return win - endif - endfor - return 0 -endfunction - " s:escape_query() {{{1 function! s:escape_query(flags, query) let tool = s:get_current_tool(a:flags) diff --git a/doc/grepper.txt b/doc/grepper.txt index 3a5269c..d1e5bb2 100644 --- a/doc/grepper.txt +++ b/doc/grepper.txt @@ -143,20 +143,11 @@ Search prompt:~ close prompt without searching close prompt without searching -Quickfix/location window:~ +If you crave any mappings for the quickfix window, I suggest having a look at +dedicated plugins: - open in last window - o open in last window - O open in last window (don't jump) - - s open in split - S open in split (don't jump) - - v open in vertical split - V open in vertical split (don't jump) - - t open in tabpage - T open in tabpage (don't jump) + - https://github.com/yssl/QFEnter + - https://github.com/romainl/vim-qf ============================================================================== OPTIONS *grepper-options*