Fzf: Ignoring certain patterns

Created on 11 Apr 2015  路  3Comments  路  Source: junegunn/fzf

Splitting this from #181

fzf is a command line filter that can be used with anything, so it doesn't have the notion of ignored files and folders.

ps -ef | fzf
seq 1 100 | fzf

When the input is not specified (fzf w/o STDIN pipe), it will use find command as the default input. You can set $FZF_DEFAULT_OPTS environment variable to a command that lists the files as you like.

Sorry my knowledge is limited, how can I supply a list of ignored patterns for FZF?

question

Most helpful comment

Note that you can also set the environment variable inside vim:

let $FZF_DEFAULT_COMMAND = 'ag -l -g ""'

All 3 comments

It's not the responsibility of fzf. You have to feed the right input to fzf, and for vim plugin, setting up $FZF_DEFAULT_COMMAND will do. You can set it to some command or your own script that lists the files under the current directory.
Please refer to: https://github.com/junegunn/fzf#respecting-gitignore-hgignore-and-svnignore

Note that you can also set the environment variable inside vim:

let $FZF_DEFAULT_COMMAND = 'ag -l -g ""'

For googlers - you can also add --skip-vcs-ignores to use .agignore but not .gitignore. This allowed me to also search in my vendor folder but ignore code coverage files, generated documentation, etc.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

olethanh picture olethanh  路  3Comments

aleclarson picture aleclarson  路  3Comments

kit494way picture kit494way  路  3Comments

chrisamow picture chrisamow  路  3Comments

nordlow picture nordlow  路  3Comments