Reputation: 1876
Which text editor allows to search all files in the project, without a need they to be opened?
For example: When I'm using Visual Studio and I open project Ctrl+F
allows searching into all of the files in the current project. That's for ASP.NET
projects.
I want to be able to search in my PHP
project. I'm using NotePad++
, but when I want to search into all the files, I need to open all of them first, and after entering the phrase to choose Find All in All Opened Documents
. But now my project is getting bigger and bigger, and I want to be able to search into all of the files, without need all of them to be opened as a tabs.
Is there such an option in NotePad++
? If not, can you recommend me some text editor or IDE
that allows this type of searching in normal PHP
project(and how that can be done)?
Upvotes: 1
Views: 1595
Reputation: 10129
the function is just in front of you:
Notepad++ offers the "Find in Files..." Option in the search menu. (It is just the third tab in the usual search dialog. )
Just enter the correct filter (e.g. *.php
or *.*
) and use the checkboxes on the right. Most useful is "Follow current doc", which preselects the "Directory" selection. Depending on your project layout you want to enter a constant path there and also check the "In all sub-folders" option.
I really miss the ease of this notepad++ function in eclipse. For me this IS "grep for windows". And you have also replace functionality, so this can be a "sed for windows" replacement, too.
With best regards,
Lars
Upvotes: 2
Reputation: 902
what operating system are you using?
In most Linux distros you could use the command line with something like this
grep -rnw ./haystack/* -e "needle"
Upvotes: 0