From 1e9f916d34497b1ff1b40c61898bfec1d9e4b0fd Mon Sep 17 00:00:00 2001 From: jremmen Date: Sun, 11 Mar 2018 14:02:21 -0700 Subject: [PATCH] Allow setting of quickfix window location --- plugin/vim-ripgrep.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugin/vim-ripgrep.vim b/plugin/vim-ripgrep.vim index 7e12922..3069eb2 100644 --- a/plugin/vim-ripgrep.vim +++ b/plugin/vim-ripgrep.vim @@ -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)