Compare commits

...

4 commits

Author SHA1 Message Date
John Remmen
2bb2425387
Merge pull request #56 from tacahiroy/fix-e1208
Fix E1208 started showing up in Vim v8.2.3149
2021-11-30 14:20:45 -08:00
Takahiro Yoshihara
84d148676e Fix E1208 started showing up in Vim v8.2.3149
`-complete` is not needed since :RgRoot` takes no arguments.
2021-07-12 10:03:02 +09:00
John Remmen
ec87af6b69
Merge pull request #28 from watsoncj/master
Allow passing arbitrary arguments and paths to Rg command, thanks @watsoncj
2018-09-08 19:26:08 -07:00
Casey Watson
8d27cd24cd Allow passing arbitrary arguments and paths to Rg command
- Only wrap the search string in quotes during visual search. As was the
  behavior prior to 7d01d697.
- Restore the ability to use all ripgrep features from command mode:
  `:Rg --fixed-strings \.Model service/`

fixes #25
2018-08-24 13:50:49 -06:00

View file

@ -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)
@ -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!
@ -146,4 +146,4 @@ fun! s:RgShowRoot()
endfun
command! -nargs=* -complete=file Rg :call s:Rg(<q-args>)
command! -complete=file RgRoot :call s:RgShowRoot()
command! RgRoot :call s:RgShowRoot()