Fork me on GitHub
#emacs
<
2019-02-28
>
Piotr11:02:25

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?

cichli12:02:43

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

Piotr12:02:36

yes, I want to find in files ! Thanks

practicalli-john16:02:15

@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.

Piotr18:02:13

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