diff --git a/config/plugins.shared.vim b/config/plugins.shared.vim index 27063af..bc08394 100644 --- a/config/plugins.shared.vim +++ b/config/plugins.shared.vim @@ -43,20 +43,32 @@ if executable('fzf') && v:version >= 704 nnoremap fg :GFiles nnoremap ff :Files - nnoremap fr :History + nnoremap fH :History nnoremap ft :Tags nnoremap fb :Buffers nnoremap fh :Helptags - nnoremap fa :Ag - nnoremap fA :Ag! + " nnoremap fa :Ag + " nnoremap fA :Ag! " Ag! gives fullscreen with preview - command! -bang -nargs=* Ag - \ call fzf#vim#ag(, - \ 0 ? fzf#vim#with_preview('up:60%') - \ : fzf#vim#with_preview('right:50%:hidden', '?'), - \ 0) - + " command! -bang -nargs=* Ag + " \ call fzf#vim#ag(, + " \ 0 ? fzf#vim#with_preview('up:60%') + " \ : fzf#vim#with_preview('right:50%:hidden', '?'), + " \ 0) + " + " Similarly, we can apply it to fzf#vim#grep. To use ripgrep instead of ag: + command! -bang -nargs=* Rg + \ call fzf#vim#grep( + \ 'rg --column --line-number --no-heading --color=always --smart-case '.shellescape(), 1, + \ 0 ? fzf#vim#with_preview('up:60%') + \ : fzf#vim#with_preview('right:50%:hidden', '?'), + \ 0) + + " Files command with preview window + command! -bang -nargs=? -complete=dir Files + \ call fzf#vim#files(, fzf#vim#with_preview(), 0) + let g:fzf_colors = \ { 'fg': ['fg', 'Normal'], \ 'bg': ['bg', 'Normal'],