diff --git a/README.md b/README.md index 2667170..9ff96cb 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ smart people at [Hashrocket](http://hashrocket.com/). For a steady stream of TILs from a variety of rocketeers, checkout [til.hashrocket.com](https://til.hashrocket.com/). -_801 TILs and counting..._ +_802 TILs and counting..._ --- @@ -790,6 +790,7 @@ _801 TILs and counting..._ - [Close the Current Buffer](vim/close-the-current-buffer.md) - [Coerce The Current Filetype](vim/coerce-the-current-filetype.md) - [Coercing Casing With vim-abolish](vim/coercing-casing-with-vim-abolish.md) +- [Configure FZF To Use fd For File Finding](vim/configure-fzf-to-use-fd-for-file-finding.md) - [Count the Number of Matches](vim/count-the-number-of-matches.md) - [Create A New Directory In netrw](vim/create-a-new-directory-in-netrw.md) - [Create A New File In A New Directory](vim/create-a-new-file-in-a-new-directory.md) diff --git a/vim/configure-fzf-to-use-fd-for-file-finding.md b/vim/configure-fzf-to-use-fd-for-file-finding.md new file mode 100644 index 0000000..1f84880 --- /dev/null +++ b/vim/configure-fzf-to-use-fd-for-file-finding.md @@ -0,0 +1,25 @@ +# Configure FZF To Use fd For File Finding + +By default, FZF uses the `find` command as its source for fuzzy finding +files. So [`fzf.vim`](https://github.com/junegunn/fzf.vim) will also be +using `find` when you invoke `:Files`. There are some speedier, more +intelligent, and more user-friendly alternatives to `find`. I like +[`fd`](https://github.com/sharkdp/fd). + +We can configure `FZF` to use `fd` by adding a line like the following to +our `~/.vimrc` file. + +```vimscript +let $FZF_DEFAULT_COMMAND = 'fd --type f --color=always' +``` + +This will use `fd` to find files (`--type f`) using colorful output. + +We can remove some noise from the output by adding a couple extra flags: + +```vimscript +let $FZF_DEFAULT_COMMAND = 'fd --type f --color=always' --exclude .git --ignore-file ~/.gitignore' +``` + +This will keep the `.git` directory out of the result and prevent anything +listed in the main `.gitignore` file from being found.