mirror of
https://github.com/jremmen/vim-ripgrep.git
synced 2025-12-27 04:04:58 +08:00
Allow setting of quickfix window location
This commit is contained in:
parent
e803767d12
commit
1e9f916d34
1 changed files with 5 additions and 1 deletions
|
|
@ -20,6 +20,10 @@ if !exists('g:rg_root_types')
|
|||
let g:rg_root_types = ['.git']
|
||||
endif
|
||||
|
||||
if !exists('g:rg_window_location')
|
||||
let g:rg_window_location = 'botright'
|
||||
endif
|
||||
|
||||
fun! s:Rg(txt)
|
||||
call s:RgGrepContext(function('s:RgSearch'), s:RgSearchTerm(a:txt))
|
||||
endfun
|
||||
|
|
@ -35,7 +39,7 @@ endfun
|
|||
fun! s:RgSearch(txt)
|
||||
silent! exe 'grep! ' . a:txt
|
||||
if len(getqflist())
|
||||
copen
|
||||
exe g:rg_window_location 'copen'
|
||||
redraw!
|
||||
if exists('g:rg_highlight')
|
||||
call s:RgHighlight(a:txt)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue