CotEditor is a Cocoa text editor designed for editing plain text files such as web pages (HTML), program source codes (Python, Ruby, etc.), or TeX sources. CotEditor offers a lot of useful features that are not available in macOS's TextEdit. You'll find some of them below.
CotEditor has a very powerful find and replace feature.
In addition to the support for regular expression search, you can display a list of search results, or highlight matched words in your document.
CotEditor can colorize particular strings such as reserved words of programming languages, TeX commands, and HTML elements.
Coloring rules for major programming languages are built in by default, and you can add or customize styles as you like. You can also define the strings to be colored by regular expression patterns, not only by words.
Word completion assists you to input words faster, such as when typing reserved words of programming languages or HTML elements.