Skip to content

Commit

Permalink
Merge pull request #28 from watsoncj/master
Browse files Browse the repository at this point in the history
Allow passing arbitrary arguments and paths to Rg command, thanks @watsoncj
  • Loading branch information
jremmen committed Sep 9, 2018
2 parents f7c1549 + 8d27cd2 commit ec87af6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugin/vim-ripgrep.vim
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if !exists('g:rg_window_location')
endif

fun! g:RgVisual() range
call s:RgGrepContext(function('s:RgSearch'), s:RgGetVisualSelection())
call s:RgGrepContext(function('s:RgSearch'), '"' . s:RgGetVisualSelection() . '"')
endfun

fun! s:Rg(txt)
Expand Down Expand Up @@ -61,7 +61,7 @@ fun! s:RgSearch(txt)
if &smartcase == 1
let l:rgopts = l:rgopts . '-S '
endif
silent! exe 'grep! ' . l:rgopts . '"' . a:txt . '"'
silent! exe 'grep! ' . l:rgopts . a:txt
if len(getqflist())
exe g:rg_window_location 'copen'
redraw!
Expand Down

0 comments on commit ec87af6

Please sign in to comment.