Textpad is my preferred text editor. It is super-simple, but has a few advanced features that really make writing source code for various things so much nicer. Besides that it has coloring for various document classes.
Document classes are basically groups file extensions whose properties can be changed for each group. Example: you can completely change the coloring, paragraph options, tab-width and printing properties for HTML files only. Or you could add line numbers to Java script files and leave line numbering out for everything else. Or perhaps the PHP comment is not the same as the html comment (which it isn’t! HTML comments look like this: <!– Stuff –> and PHP comments look like this: // stuff or /* more stuff */.