Using TextMate as a web developer tool
It has taken several months of work on my Macbook Pro to realize that TextMate is my favorite text editor!
Here are some ways that you can use Textmate to help you with web development. Please note that all of these tips (and more) can be found in the most excellent book, Pragmatic TextMate: Power Editing for the Mac
Closing opening tags – One really important command in this bundle to open and close a tag. You can open and close a tag by typing ^+Shift+< when there is nothing to the left of your cursor. You will see a open tag and close tag appear. Type in whatever you want for your open tag and watch the close tag automatically mirror it for you. After you are done typing in the tag hit Tab and you’ll be able to place your cursor in between the open and close tag. This is great when creating pages full of HTML code. This works with XML documents as well.
Inserting a doctype – For anybody who cannot remember the syntax differences between the XHTML 1.0 Transitional and XHTML 1.0 Strict doctype element, type in the word doctype and hit Tab. This will bring up an option menu from where you can select the exact doctype that you want. It’s saved me an extra 30 seconds. Maybe it will for you too.
Validating your markup with the W3C – Every web developer is concerned with web standards. It helps ensure that all of their web pages work across multiple platforms and stays well formed so that it does not break tomorrow either. Now you can do this within Textmate by typing in ^+Shift+V.
Inserting color codes in CSS stylesheets – When you are creating your CSS stylesheets and you want to double-check the color of a particular hex value, type in Shift+Cmd+C. This will bring up Textmate’s color chooser and allow you make a choice. The color you selected will be transformed to a six digit hexadecimal value with a leading number sign.
When you start using these Textmate shortcuts to do your web development work, you are going to notice that your time to turn around web projects are going to be shorter. Combined with shortcuts, snippets, and command-line integration into Textmate, you are going to start wondering if you ever need to use any other tool for creating textual content.
The real programmer use Buterflies
http://xkcd.com/378/
Pablo Morales
28 Nov 08 at 6:16 pm
I didn’t know about CMD+SHIFT+C (the color picker) I even wrote an Apple script for that.
Wow. +fav from me!
Gyorgy Fekete
28 Nov 08 at 8:33 pm
[...] Read the rest here [...]
Using TextMate as a web developer tool | bensangeorge.com | deleteblog.com
30 Nov 08 at 12:25 am
Gyorgy, yep that’s a good one. There’s a lot of tidbits that you can pick up along the way with Textmate. For example, when you are in HTML mode, you can call up a Yahoo Web search by clicking Shift+Ctrl+Y. Found a lot of these by pure luck.
bensan
30 Nov 08 at 11:48 pm