Open fernandoacorreia opened 7 years ago
" ripgrep
if empty(glob("~/bin/rg"))
execute '!curl -Ls https://github.com/BurntSushi/ripgrep/releases/download/0.3.1/ripgrep-0.3.1-x86_64-unknown-linux-musl.tar.gz | tar xzf - -C ~/bin --strip=1 --wildcards "*/rg"'
endif
command! -bang -nargs=* Find call fzf#vim#grep('rg --column --line-number --no-heading --fixed-strings --hidden --glob "!.git/*" --follow --color "always" '.shellescape(<q-args>), 1, <bang>0)
set grepprg=rg\ --vimgrep\ --no-heading
set grepformat=%f:%l:%c:%m
From https://medium.com/@crashybang/supercharge-vim-with-fzf-and-ripgrep-d4661fc853d2:
Now we are going to define our own :Find command so we can leverage rg for more than just finding files. To do this add the following to your .vimrc:
Now open up vim again and run :Find term where term is the string you want to search, this will open up a window similar to :Files but will only list files that contain the term searched.