Skip to content

Instantly share code, notes, and snippets.

@hrfuller
Created April 3, 2020 18:48
Show Gist options
  • Save hrfuller/1c2a1a9838566cd7f87c9d6a0d7d77c8 to your computer and use it in GitHub Desktop.
Save hrfuller/1c2a1a9838566cd7f87c9d6a0d7d77c8 to your computer and use it in GitHub Desktop.
Setting up vim fzf with ripgrep
" need ripgrep and fzf installed. Both these plugins are needed by vim.
Plugin 'junegunn/fzf'
Plugin 'junegunn/fzf.vim'
" Map ctrl-p to FZF
nnoremap <silent> <C-p> :GFiles <CR>
"Quick ripgrep word under cursor
command! -bang -nargs=0 RgCWord
\ call fzf#vim#grep(
\ 'rg --column --line-number --no-heading --color=always --smart-case '.shellescape(expand('<cword>')), 1,
\ fzf#vim#with_preview(), <bang>0)
nnoremap <C-g> :RgCWord<CR>
@leporid
Copy link

leporid commented May 22, 2020

Me exercising the pinky-finger's-worth of Spanish in my brain, and a healthy dictionary reliance. Thanks for the hot config tip, which I finally put into el .vimrc. Rg es sexi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment