Fork me on GitHub

Hi, when I do SPC / to do smart search in my spacemacs it does search everywhere. That's all nice, but if I want to exclude for example resources not to include compiled cljs how do I achieve that? Basically I want to remove content of .gitignore from the search results. Any recommendations?

Michael Griffiths12:02:43

I see you meant find-in-files, not find-file ๐Ÿ˜„. Look into โ€“ that understands .gitignore, and I imagine Spacemacs will use it automatically if itโ€™s installed


yes, I want to find in files ! Thanks


@piotr.kurnik using ripgrep or silver-searcher should respect your .gitignore. To exclude certain file patterns with SPC / you can also use -g! to exclude files or -g (although this may not work for all search tools). For example to exclude png images from a search, I would use -g!*.png at the start of the pattern and then a space followed by the term I was searching for.


@U05254DQM thanks a lot! I will give it a try