TextMate – Shortcut Heaven! – #in


i’ve started to learn HTML5, to discover how close the new functionality it has, can compete with Flash, which has functionality I’m familiar with. I decided to use TextMate to write the necessary html and css and discovered a world of numerous, sometimes fiddly but efficient shortcuts.

A list of shortcuts

This list isn’t meant to be exhaustive list, rather a first set of key combinations to remember.  I’ve used the key notation used by the TextMate manual, I’ve provided a brief explanation of the glyphs used below the list.

General shortcuts

⌘T – Go to File Use this to quickly jump straight to any file you wish to be in.

⇧⌘T – Go to Symbol– This works in the same way as Go to File but for within a specific file.

⌘L – Go to Line

⇧⌘L – Select Line Select the entire line of code you’re working on.

⌃⌘ + ARROW – Move Code – Move the selected code up or down.

⌃S –  Simple Search Allows you to do a quick search in the current file iteratively.

⌘] and ⌘[ –  Block indentation

⇧⌃T – To-do listThis feature scans the project for code marked as ‘FIXME’, ‘TODO’ and ‘CHANGED’.

⎋ – Complete the current word – based on matches in the current document. Press continuously will cycle through multiple matches

HTML Bundle Shortcuts

⌥⌘.  –  Insert close tag Will find one missing end tag and add it – perform multiple times if a few are missing.

⌃⇧HTidy – Will format code and give you warnings.

⌃< – Insert Open/Close TagCreates a <p></p> pair, where the p can be overwritten.  (Remember need the shift as well as the < key).

⌃⇧W Wrap selection with a logical wrapper, again the p can be overwritten.

⌃⇧V –  Validate Syntax –  Sends the document to the W3C’s validation service and displays the results in a HTML window, adding links to jump back to errors.

⌃⇧L Wrap selection as link.

lorem⇥  Inserts lorem ipsum paragraph

OSX Glyphs ( as used above )

⌘ – Command (On older keyboards the Apple key with a  )

⇧  Shift

– Control ( or ctrl )

⎋ Escape ( or esc )

⌥ Option ( or confusingly alt )




Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s