Notepad++ alternative with the ability to search in folder [duplicate]

I am looking for an alternative program on macOS, like Notepad++ with two abilities:

  1. To write and edit program code,

and

  1. Search specific string in a folder full of text files.

Atom is another great editor that has the features you are looking for, with the added benefit of being free and open source.

A good comparison of Atom and Sublime Text 3 can be found here