CotEditor is a Cocoa text editor designed for editing plain text files such as web pages (HTML), program source codes (Perl, Ruby, etc.), or TeX sources. CotEditor offers a lot of useful features that are not available in Mac OS X's TextEdit. You'll find some of them below.
CotEditor has a very powerful find and replace using OgreKit [website].
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.
CotEditor's Outline Menu extracts predefined keywords from the document and displays them in a drop-down menu. By clicking on a listed item, you can go directly to the corresponding part of your document.
You can set what items should appear and how they should be titled in the menu by customizing the corresponding syntax style.
Word completion assists you to input words faster, such as when typing reserved words of programming languages or HTML elements.
If you press the ESC or F5 key after typing the first few letters of a word, a list of possible completions shows up. You only need to select the one you want to input from the list. The range of completions can be expanded or limited.
The Script menu lets you run scripts to manipulate your document or launch external programs.
You can use AppleSctipt scripts, Perl, PHP, Ruby, and UNIX shell scripts as well.