Mac: Plain text editors tend to cost a lot when they help you write better code, and TextMate (our favorite) is no exception. Textastic, on the other hand, offers a very similar feature set and costs a tiny fraction of the price.
For $2.99, Textastic provides wonderful syntax highlighting and code completion for many popular languages. If it doesn't support it and TextMate does, no problem — it can understand TextMate's definitions and themes.
Speaking of themes, Textastic already comes with several beautiful ones built-in. It also supports newer OS X Mountain Lion features such as iCloud, Autosave and Versions so you can easily manage your files however you like and never worry about reverting to an older copy. Textastic is also available for iPhone and iPad, but at a higher price. Textastic for Mac is just a few days old, so more features will likely come, but it's already a fantastic programming text editor regardless of your budget.
Textastic ($2.99 for now, $6.49 in the future) [Mac App Store]