Ignore some folders completely when searching for files

Something is missing in Far Manager? You have a great idea that should be heard? Write here.
Post Reply
acker
Posts: 6
Joined: Sat 09 Oct, 2010 00:15
Has thanked: 3 times

Ignore some folders completely when searching for files

Post by acker » Thu 18 Oct, 2018 13:33

I want to search for files but to exclude some folders (by name) completely.

Let's says we have the following structure:
project 1 .git node_modules module1 ... module1000 src ... project N .git node_modules module1 ... module1000 src

I want for example to skip all the folders named .git or node_modules completely.
From what I see I can only skip files named in a specific way using the Filter.

What do you think? Would it be useful to have this in the standard package? Can it be implemented easier with the help of add-ons?

If you think this issue would get better traction in the Russian part of the forum, feel free to translate part of it an post it there. Please link it from here at least.

Shmuel
Posts: 5615
Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 21 times
Been thanked: 187 times

Ignore some folders completely when searching for files

Post by Shmuel » Thu 18 Oct, 2018 13:53

Plugin LuaFAR Search has this feature ("Directory filter").

User avatar
HaRT
Moderator
Posts: 8536
Joined: Tue 30 Aug, 2005 17:21
Location: Санкт-Петербург
Has thanked: 75 times
Been thanked: 138 times

Ignore some folders completely when searching for files

Post by HaRT » Thu 18 Oct, 2018 15:16

The RESearch plugin supports this too.
Фар есть инструмент, а не нянька. © 2009 DrKnS

acker
Posts: 6
Joined: Sat 09 Oct, 2010 00:15
Has thanked: 3 times

Ignore some folders completely when searching for files

Post by acker » Thu 18 Oct, 2018 16:45

Thank you Shmuel and HaRT, I will take a look at them.

Yegor
Posts: 939
Joined: Mon 04 Apr, 2005 13:41
Location: San Ramon, CA / Kharkov, UA
Has thanked: 3 times
Been thanked: 11 times

Ignore some folders completely when searching for files

Post by Yegor » Thu 18 Oct, 2018 17:52

Five cents from me, the feature has been supported by builtin search (AltF7). Moreover I personally use exclusions provided by you in my default configuration.

Below are my filters. Do not forget to select [x] Directory attribute in a single filter in order to search for folders instead of files.

Last edited by Yegor on Thu 18 Oct, 2018 17:53, edited 2 times in total.
Мы не можем ждать милостей от Фара, взять их у него — наша задача! (C) Мичурин

acker
Posts: 6
Joined: Sat 09 Oct, 2010 00:15
Has thanked: 3 times

Ignore some folders completely when searching for files

Post by acker » Fri 19 Oct, 2018 10:01

Hey Yegor, that's GREAT! Thanks a lot for the 5 cents ;)

I've tested it yesterday the wrong way: I've used the exclusion mask |.git in the hope the files would be excluded, instead of matching the files/directories that need to be excluded and then using the filter as exclude (minus, or X). I even took a look at the code in findfile.cpp and I've seen in some cases the folders were completely skipped, but I thought it still won't work in my case.

Although I strongly prefer using standard behavior instead of plugins, I will definitely take a look at the other two plugins specified. I usually need to start Notepad++ when I do Regexp search and replace.
I've installed REsearch this morning. It had two entries in the plugins menu, one seems to be crashing – I need to probably remove some of the DLLs used by FAR v2, v1.

Post Reply

Return to “Suggestions and Ideas”