Change Rg function to be global

It allows for mappings in vimrc such as:

  map <leader>a :call Rg(expand("<cword>"))<CR>
This commit is contained in:
Szymon Szeliga 2019-01-15 09:57:59 +01:00
parent ec87af6b69
commit f9c743becb

View file

@ -28,7 +28,7 @@ fun! g:RgVisual() range
call s:RgGrepContext(function('s:RgSearch'), '"' . s:RgGetVisualSelection() . '"')
endfun
fun! s:Rg(txt)
fun! g:Rg(txt)
call s:RgGrepContext(function('s:RgSearch'), s:RgSearchTerm(a:txt))
endfun