Current functionality
When I use <C-P>
and <C-Å>
I can respectively search file names and contents. Everything works great.
Target functionality
When prepending either with <leader>
, I would like to pass the --no-ignore
flag to each command (ex. <legend><C-P>
).
Here are the relevant parts of my .vimrc
nnoremap <C-P> :Files<CR>
nnoremap <C-Å> :Find<CR>
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim' " Fuzzy search
let $FZF_DEFAULT_COMMAND = 'rg --files --hidden --follow --glob "!{.git,node_modules}/*"' " Enable respecting .gitignore for files
command! -bang -nargs=* Find call fzf#vim#grep('rg --column --line-number --no-heading --fixed-strings --ignore-case --hidden --follow --glob "!{.git,node_modules}/*" --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..'}, 'right:50%:hidden', '?'),
\ <bang>0)
set grepprg=rg\ --vimgrep