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: 4 times

Ignore some folders completely when searching for files

Post by acker »

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: 6834
Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 41 times
Been thanked: 530 times

Ignore some folders completely when searching for files

Post by Shmuel »

Plugin LuaFAR Search has this feature ("Directory filter").
User avatar
HaRT
Moderator
Posts: 10855
Joined: Tue 30 Aug, 2005 17:21
Has thanked: 221 times
Been thanked: 358 times

Ignore some folders completely when searching for files

Post by HaRT »

The RESearch plugin supports this too.
Фар есть инструмент, а не нянька. © 2009 DrKnS
acker
Posts: 6
Joined: Sat 09 Oct, 2010 00:15
Has thanked: 4 times

Ignore some folders completely when searching for files

Post by acker »

Thank you Shmuel and HaRT, I will take a look at them.
Yegor
Posts: 1328
Joined: Mon 04 Apr, 2005 13:41
Location: San Ramon, CA / Kharkov, UA
Has thanked: 32 times
Been thanked: 61 times

Ignore some folders completely when searching for files

Post by Yegor »

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: 4 times

Ignore some folders completely when searching for files

Post by acker »

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”