mirror of
https://github.com/jremmen/vim-ripgrep.git
synced 2026-01-08 03:17:28 +08:00
Merge 4fb4c57853 into e803767d12
This commit is contained in:
commit
3e6c2dab54
2 changed files with 15 additions and 10 deletions
19
README.md
19
README.md
|
|
@ -7,15 +7,16 @@ Word under cursor will be searched if no argument is passed to `Rg`
|
||||||
## configuration
|
## configuration
|
||||||
|
|
||||||
|
|
||||||
| Setting | Default | Details
|
| Setting | Default | Details
|
||||||
| -----------------|---------------------------|----------
|
| ------------------|---------------------------|----------
|
||||||
| g:rg_binary | rg | path to rg
|
| g:rg_binary | rg | path to rg
|
||||||
| g:rg_format | %f:%l:%c:%m | value of grepformat
|
| g:rg_format | %f:%l:%c:%m | value of grepformat
|
||||||
| g:rg_command | g:rg_binary --vimgrep | search command
|
| g:rg_command | g:rg_binary --vimgrep | search command
|
||||||
| g:rg_highlight | false | true if you want matches highlighted
|
| g:rg_highlight | false | true if you want matches highlighted
|
||||||
| g:rg_derive_root | false | true if you want to find project root from cwd
|
| g:rg_derive_root | false | true if you want to find project root from cwd
|
||||||
| g:rg_root_types | ['.git'] | list of files/dir found in project root
|
| g:rg_root_types | ['.git'] | list of files/dir found in project root
|
||||||
|
| g:rg_escape_vbars | false | true if you want to escape vertical bars (`|`) in the keyword
|
||||||
|
|
||||||
## misc
|
## misc
|
||||||
|
|
||||||
Show root search dir
|
Show root search dir
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,11 @@ if !exists('g:rg_root_types')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
fun! s:Rg(txt)
|
fun! s:Rg(txt)
|
||||||
call s:RgGrepContext(function('s:RgSearch'), s:RgSearchTerm(a:txt))
|
let l:txt = a:txt
|
||||||
|
if exists('g:rg_escape_vbars')
|
||||||
|
let l:txt = escape(l:txt, '|')
|
||||||
|
endif
|
||||||
|
call s:RgGrepContext(function('s:RgSearch'), s:RgSearchTerm(l:txt))
|
||||||
endfun
|
endfun
|
||||||
|
|
||||||
fun! s:RgSearchTerm(txt)
|
fun! s:RgSearchTerm(txt)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue