NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Exclude directories from SEARCH but not from code inspection

Joined: 30 May 2006
Posts: 35
Reply with quote
I need to find in files string "WebUser" within the project root "/app" (means only in project files).

However, I want to exclude "/app/vendor/" directory from search.
This is default directory used e.g. by composer - it's really huge - and contains third party libraries, framework classes, etc etc
"/app/vendor/" is necessary for class/traits/obejcts declarations (code inspection), but bad for searching (often contains large files, may have 50 - 100 MB ...).

When I hide directory "/app/vendor" via Projects properties, then it will be excluded from file search (which is my goal), but it will not find class declarations (undesired side effect).
E.g. CTRL + classname returns Failed to find "xxxxxx" class (or trait).

My question is:
How to exclude directories ONLY from search, while keeping it availble for IDE object parsing capabilities (code inspection)?

Thank you.
View user's profileFind all posts by lubosdzSend private message
Guru master

Joined: 24 Jul 2009
Posts: 715
Reply with quote
That might need to be a new PhpED feature request. Using a file mask of *.php (or a suitable list) or All non-binary files can sometimes make the search a lot faster. I find PhpED chokes on binary font files and that slows down searches.

If you do lots of searches then it is well worth having a look at PowerGREP from Just Great Software

I purchased the bundle of regex tools (RegExMagic, PowerGREP and RegexBuddy) primarily because I wanted assistance with developing & testing regex using RegexBuddy and it wasn't much more to get the bundle. Whilst RegexBuddy is brilliant, it subsequently turned out that I use PowerGREP by far the most for doing searches. Besides being extremely flexible, it is also very fast if you are doing multiple searches because it uses a search cache.

Over a network connection I did a search with PowerGREP for 34,676 files in a composer vendor directory in 55 seconds whereas PhpED took 195 seconds. That was just a timing comparison; I realise you don't want to search vendor so simply typing vendor in an exclude folders list is all you would need to do.

PowerGREP has a useful editor, but you can configure it to open the files in PhpED, so you effectively get integration.

Whilst unfortunately this doesn't resolve your query about searching within PhpED, using PowerGREP can be a great time-saving tool.
View user's profileFind all posts by plugnplaySend private message
Exclude directories from SEARCH but not from code inspection
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

 Reply to topic