diff options
Diffstat (limited to 'plug-config/fzf.vim')
-rw-r--r-- | plug-config/fzf.vim | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/plug-config/fzf.vim b/plug-config/fzf.vim index c7ad00a2..c715dab5 100644 --- a/plug-config/fzf.vim +++ b/plug-config/fzf.vim @@ -47,10 +47,17 @@ command! -bang -nargs=? -complete=dir Files " Get text in files with Rg +" command! -bang -nargs=* Rg +" \ call fzf#vim#grep( +" \ "rg --column --line-number --no-heading --color=always --smart-case --glob '!.git/**' ".shellescape(<q-args>), 1, + + " Make Ripgrep ONLY search file contents and not filenames command! -bang -nargs=* Rg \ call fzf#vim#grep( - \ "rg --column --line-number --no-heading --color=always --smart-case --glob '!.git/**' ".shellescape(<q-args>), 1, - \ fzf#vim#with_preview(), <bang>0) + \ 'rg --column --line-number --hidden --smart-case --no-heading --color=always '.shellescape(<q-args>), 1, + \ <bang>0 ? fzf#vim#with_preview({'options': '--delimiter : --nth 4..'}, 'up:60%') + \ : fzf#vim#with_preview({'options': '--delimiter : --nth 4.. -e'}, 'right:50%', '?'), + \ <bang>0) \ fzf#vim#with_preview(), <bang>0) " Ripgrep advanced function! RipgrepFzf(query, fullscreen) |