https://github.com/alejandrogallo/vim-ripgrep
A stupid simple integration of ripgrep and vim
https://github.com/alejandrogallo/vim-ripgrep
grep kiss ripgrep vim-configuration vim-plugin vimrc
Last synced: 4 months ago
JSON representation
A stupid simple integration of ripgrep and vim
- Host: GitHub
- URL: https://github.com/alejandrogallo/vim-ripgrep
- Owner: alejandrogallo
- Created: 2019-03-09T00:51:00.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-09T00:55:02.000Z (over 7 years ago)
- Last Synced: 2025-09-17T16:08:28.413Z (9 months ago)
- Topics: grep, kiss, ripgrep, vim-configuration, vim-plugin, vimrc
- Size: 0 Bytes
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Just add these lines into your `.vimrc`
```vim
function! Rg(...)
let l:output = system("rg --vimgrep ".join(a:000, " "))
let l:list = split(l:output, "\n")
let l:ql = []
for l:item in l:list
let sit = split(l:item, ":")
call add(l:ql,
\ {"filename": sit[0], "lnum": sit[1], "col": sit[2], "text": sit[3]})
endfor
call setqflist(l:ql, 'r')
echo 'Rg results: '.len(l:ql)
endfunction
command! -nargs=* Rg call Rg()
```
and use it like
```
:Rg something
```
and browse the results with `:cn` and `:cp`.