Thanks to visit codestin.com
Credit goes to github.com

Skip to content

bombela/fzf.vim.rgfd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fzf vim - rg/fd support

Interactive search through files with rg and searching files with fd with fzf.vim.

Installation

fzf.vim.rgfd depends on fzf.vim which depends on the basic Vim plugin of the main fzf repository, which means you need to set up "fzf", "fzf.vim", and "fzf.vim.rgfd on Vim. To learn more about fzf/Vim integration, see README-VIM.

Using vim-plug

Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
Plug 'bombela/fzf.vim.rgfd'

fzf#install() makes sure that you have the latest binary, but it's optional, so you can omit it if you use a plugin manager that doesn't support hooks.

Commands

command description
:Fd[!] [PATTERN] [PATH] [RESUME=0] rg search result
:Rg[!] PATTERN [PATH] [RESUME=0] fd search result

Configuration example

" Current working directory file search (project search).
" The search resumes with the last searched path. ctrl-r resets to the CWD.
map <C-p> :Fd . . 1<CR>
" Relative to current file search (relative search).
" The search never resumes.
map <C-\> :Fd . %:h 0<CR>

" Current working directory, grep word under cursor (project search).
" The search resumes with the last searched path. ctrl-r resets to the CWD.
map <A-p> :execute "Rg ".expand("<cword>")<CR>
" Relative to current file, grep word under cursor (relative search).
" The search never resumes.
map <A-\> :execute "Rg ".expand("<cword>")." %:h"<CR>

Documentation

:help fzf-vim-rgfd or doc/fzf-vim-rgfd.txt.

License

MIT

About

Interactive rg/fd with fzf.vim

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published