My favorite is
UltraEdit (with the UltraCompare) option, but at $50, it is overkill if you are not a programmer.
My favorite freeware one is
Notepad++. It's missing a few features that UltraEdit has, like sort and compare, but it has the basics, such as syntax highlighting for common programming languages, and the price is right.