8000 GitHub - wookayin/fzf-ripgrep.vim: Vim + Fzf + Rg = Super Fast Jumper
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

wookayin/fzf-ripgrep.vim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

fzf-ripgrep.vim

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.

Features

  • 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-line rg does

Usage

Commands

Command List
:Rg [query] Perform rg search (interactive query refinement)
:RgFzf [query] Perform rg search (filtering with FZF), similar to fzf.vim's :Rg

Keybindings

  • 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 (or g:fzf_ripgrep_keybindings['toggle-preview'])

Advanced: as a vim function

fzf#vim#ripgrep#rg(search_pattern, opts)

fzf#vim#ripgrep#rg_fzf(search_pattern, opts)

opts:

  • fullscreen (boolean)
  • prompt_name (str), defaults Rg
  • prompt_query (str), defaults a:search_pattern
  • path (str), path (file or directory) to perform ripgrep search on.

Installation

Plug 'wookayin/fzf-ripgrep.vim'

License

The MIT License (c) 2020 Jongwook Choi (@wookayin)

About

Vim + Fzf + Rg = Super Fast Jumper

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0