The best code editor for the mac is textmate. It’s old, and outdated, but still the best due to its customizable bundles.
If you are doing html/css work, the one bundle you need is here: http://minimaldesign.net/downloads/tools
After you download and install it, here are the most common used commands.
- Command option period (this will finish your tag)
- Option drag (make block selections)
- Command / (this will make block comments)
- Command T (global search in a project)
- Control shift < (creates start and end tags)
- Control shift W (wrap a selection in a new tag)
- Control shift D (duplicate a line)