I have fzf setup in vim with barely any customisation:
" fzf and ripgrep settings
set rtp+=/usr/local/opt/fzf
let g:fzf_action = {
\ 'ctrl-t': 'tab split',
\ 'ctrl-i': 'split',
\ 'ctrl-s': 'vsplit'
\ }
In my .bash_profile
, I set the environment variable FZF_DEFAULT_COMMAND
to show hidden, but ignore node_modules
and .git
:
export FZF_DEFAULT_COMMAND='rg --files --follow --no-ignore-vcs --hidden -g "!{node_modules/*,.git/*}"'
However, when I use :Files
function in vim, it still searches in the folders i want ignored.
Have you tried :GFiles
command?
It is one of the best FZF command that is excluding anything that is in .gitignore.
Personally I like to use it as default.
:help fzf-vim-commands
Silly me. I forgot to source ~/.bash_profile
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With