UsePlugin 'fzf.vim' " fzf " let $FZF_DEFAULT_COMMAND = 'rg --files --follow --hidden --no-ignore-vcs -g "!{.git,node_modules}/*" 2>/dev/null' " if executable('rg') let $FZF_DEFAULT_COMMAND = 'rg --files --follow --hidden -g "!{.git,node_modules}/*" 2>/dev/null' nmap f :Files command! -bang -nargs=* Rg \ call fzf#vim#grep( \ 'rg --column --line-number --no-heading --color=always --smart-case --hidden -g "!{.git,node_modules}/*" '.shellescape(), 1, \ 0 ? fzf#vim#with_preview('up:60%') \ : fzf#vim#with_preview('right:50%:hidden', '?'), \ 0) nmap r :Rg else nmap f :GFiles endif if executable('ag') autocmd VimEnter * command! -bang -nargs=* Ag \ call fzf#vim#ag(, '--hidden --ignore .git --skip-vcs-ignores', 0) nmap a :Ag endif nmap ; :Buffers imap (fzf-complete-path) " refs: https://github.com/junegunn/fzf.vim/issues/821#issuecomment-581481211 let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6, 'highlight': 'Todo' } }