mirror of
https://github.com/jremmen/vim-ripgrep.git
synced 2025-12-26 19:45:29 +08:00
add search underword
This commit is contained in:
parent
1cff663698
commit
e8dcd93491
1 changed files with 9 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue