A fzf + ripgrep wrapper for vim --- things you can do more with fzf and ripgrep and (neo)vim.
fzf.vim is a great plugin which integrates fzf into vim.
One of its great feature is fzf#vim#grep
, or the :Rg
command, but we should have a full-featured ripgrep integration for fzf+vim.
This plugin adds a bunch of batteries so that you can instantly jump to everywhere ripgrep would suggest.
- Always comes with fzf preview (toggle with
CTRL-/
) - FZF matchs file contents only, not file names
- cword expansion in vim commands (e.g.
*
for<cword>
,:Rg*
) - Aware of NERDTree and NERDTreeTabs: do not mess up them
- Send the ripgrep result to the quickfix window (
<C-Q>
) - Interactive, bidirectional communication between fzf and vim through RPC
- Support many flags (e.g.,
-t
,-u
) as the command-linerg
does
Command | List |
---|---|
:Rg [query] |
Perform rg search (interactive query refinement) |
:RgFzf [query] |
Perform rg search (filtering with FZF), similar to fzf.vim's :Rg |
CTRL-Q
: Send the current search result to the quickfix window.- Common fzf key-bindings:
CTRL-T
(new tab),CTRL-X
(split),CTRL-V (vsplit) CTRL-/
to toggle preview (org:fzf_ripgrep_keybindings['toggle-preview']
)
fzf#vim#ripgrep#rg(search_pattern, opts)
fzf#vim#ripgrep#rg_fzf(search_pattern, opts)
opts:
fullscreen
(boolean)prompt_name
(str), defaultsRg
prompt_query
(str), defaultsa:search_pattern
path
(str), path (file or directory) to perform ripgrep search on.
Plug 'wookayin/fzf-ripgrep.vim'
The MIT License (c) 2020 Jongwook Choi (@wookayin)