add search underword

This commit is contained in:
jremmen 2016-09-25 10:47:52 -07:00
parent 1cff663698
commit e8dcd93491

View file

@ -21,7 +21,15 @@ if !exists('g:rg_rootfiles')
endif
fun! s:Rg(txt)
call s:RgGrepContext(function('s:RgSearch'), a:txt)
call s:RgGrepContext(function('s:RgSearch'), s:RgSearchTerm(a:txt))
endfun
fun! s:RgSearchTerm(txt)
if empty(a:txt)
return expand("<cword>")
else
return a:txt
endif
endfun
fun! s:RgSearch(txt)