You are here: PSPad forum > Bug report / Hlášení chyb > Re: Add option to skip files/directories in Search in files

Re: Add option to skip files/directories in Search in files

#1 Add option to skip files/directories in Search in files

Posted by: oeekker | Date: 2016-02-10 08:07 | IP: IP Logged

The current Search / Replace in files option is very powerful, but it would be great if you can specify files/directories to be excluded, e.g. the .hg or .git directories containing only version control data.

Alternatively it may be possible to skip hidden files (optionally), and you may be able to accomplish the same thing (given that files starting with a dot are actually hidden files on unix).

Options: Reply | Quote | Up ^


#2 Re: Add option to skip files/directories in Search in files

Posted by: pspad | Date: 2016-02-10 08:23 | IP: IP Logged

In the Program settings / tab Files and Dirs you have option ignore filer or folders by mask. It will work for search in files too.

Options: Reply | Quote | Up ^


#3 Re: Add option to skip files/directories in Search in files

Posted by: m2u_germany | Date: 2016-03-30 18:18 | IP: IP Logged

Hi,

I was asking myself the same question as the OP and couldn't get it to work either. I am aware of the setting you mentioned in your reply but the syntax for folders is still unclear to me.

In my project besides many other files and folders e. g. these paths exist:


  \ [root]
  ├─ .git\
  ├─ dist\
  │  └─ .gitkeep
  └─ src\
     └─ node_modules\
        └─ .gitkeep

What do I have to enter in the ignore settings to exclude paths “\.git”, “\dist”, and “\src\node_modules”? I was able to exclude “\.git” by simply entering “.git” in the field but adding the other two folders separated by a semicolon doesn’t seem to have any effect. They don’t disappear when I resynchronize the project folder. Do I have to enter the full path from project root or is a trailing slash required? Maybe even followed by *.*? It would even be ok if the folders themselves stay included but files contained in them should definitely not.

Any help would be greatly appreciated. Thanks & best regards!

Options: Reply | Quote | Up ^


#4 Re: Add option to skip files/directories in Search in files

Posted by: pspad | Date: 2016-03-30 18:25 | IP: IP Logged

Program settings / Files and dirs
There is field to exclude file masks from search

Options: Reply | Quote | Up ^


#5 Re: Add option to skip files/directories in Search in files

Posted by: m2u_germany | Date: 2016-04-03 20:10 | IP: IP Logged

Thanks but as I mentioned, I already knew about this setting. Problem was, that I couldn’t get it to work properly.

But I think I found out what was causing my issue and it seems to be a little bug. Suppose the following scenario:

You load a project (.ppr) that contains multiple files and folders that are displayed in the project’s treeview on the left. Now you want to exclude one of the folders, e. g. a folder called “dist”, because it contains build data you don’t want to be indexed. So you open PSPad’s settings, go to files and folders and enter “dist” as exclusion sequence. You save the settings and refresh / resynchronize the project’s structure via Project menu. Expected behavior would be, that the recently excluded folder disappears but in fact it is still present in the project. Now if I close PSPad, restart the program and refresh / synchronize the project files again, the folder suddenly disappears as expected previously.

So the bug here seems to be that folder exclusions are not applied immediately. Instead you have to restart the program and synchronize again before it shows an effect.

Hope this help, best regards!

Options: Reply | Quote | Up ^


#6 Re: Add option to skip files/directories in Search in files

Posted by: pspad | Date: 2016-04-04 11:39 | IP: IP Logged

It will be fixed in next build

Options: Reply | Quote | Up ^


#7 Re: Add option to skip files/directories in Search in files

Posted by: m2u_germany | Date: 2016-04-05 12:06 | IP: IP Logged

Great, thanks!

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR