DEV Community ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป

DEV Community ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป is a community of 966,904 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in

Discussion on: How to Use Fzf with Ripgrep to Selectively Ignore VCS Files

Collapse
 
dietrich profile image
Dietrich Moerman

Great article!

In addition to passing ripgrep options through FZF_DEFAULT_COMMAND, you can as well set the environment variable RIPGREP_CONFIG_PATH to a config file listing the options to apply to ripgrep by default. Over there I set:

--no-ignore-vcs
--hidden
Enter fullscreen mode Exit fullscreen mode

What's even more convenient, though, is to have an ~/.ignore file where you can list directories and files ripgrep should still ignore (but doesn't since we use --no-ignore-vcs):

.git/
node_modules/
Enter fullscreen mode Exit fullscreen mode

This avoids having to define an additional :All vim command and mapping.

Dietrich

Collapse
 
matrixersp profile image
Mohammed Boudad Author

Thank you!

What's even more convenient, though, is to have an ~/.ignore file where you can list directories and files ripgrep should still ignore (but doesn't since we use --no-ignore-vcs):

I tried with ~/.ignore file but it doesn't work unless created in the working directory, that's why I chose to do it this way.