diff --git a/fzf.vim b/fzf.vim index 383e065..ec55b10 100644 --- a/fzf.vim +++ b/fzf.vim @@ -18,3 +18,10 @@ let g:fzf_colors = nnoremap f :Files nnoremap b :Buffers nnoremap t :Tags + +command! -bang -nargs=* Rg + \ call fzf#vim#grep( + \ 'rg --column --line-number --no-heading --color=always '.shellescape(), 1, + \ 0 ? fzf#vim#with_preview('up:60%') + \ : fzf#vim#with_preview('right:50%:hidden', '?'), + \ 0) diff --git a/plug.vim b/plug.vim index 0d8395c..3775b9c 100644 --- a/plug.vim +++ b/plug.vim @@ -6,9 +6,9 @@ Plug 'editorconfig/editorconfig-vim' Plug 'scrooloose/nerdtree' " syntax checking on steroids Plug 'scrooloose/syntastic' -" integrate ag, especially to be able to open matches, hugely useful for +" integrate ripgrep, especially to be able to open matches, hugely useful for " code aware search -Plug 'rking/ag.vim' +Plug 'jremmen/vim-ripgrep' " lightweight but sophisticated status line Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline-themes'