TextMate Shortcuts



I have recently started using TextMate for editing my code.

Having enjoyed using the free and very excellent Komodo Edit for some time, I finally switched to this paid Application for a bunch of reasons, mostly centering around speed and ease of use.

It has all the features you would expect to find including code-completion (use the esc key to cycle through), syntax-checking, code-collapsing, ability to create macros and snippets, bundles of quick settings for virtually all the languages you will ever need and some great customisation options.

Tags can be closed using Cmd + Alt + . (period key).

Comments are really easy to add to the current line, by using Cmd + / or to a block by using alt + Cmd + /. Comment banners can be added by using ctrl + Shift + B then typing your banner text.

One of the things I really like are the html editing keyboard shortcuts: ctrl + < to insert open/close tags which are mirrored as you edit the tag. You can also type your tag and use the same shortcut to wrap the tag. Selections of text can be wrapped in open/close tags by using ctrl + Shift + W. Lines of text can be quickly wrapped to form list items for example, ctrl + Cmd + Shift + W.

To quickly go to a line number, Cmd + L.

Setting up site projects is a breeze – drag the individual site folder from the Finder to the TextMate icon in the Dock. The Project Drawer is a useful thing to have access to for quickly getting at the files. It can be hidden or shown using ctrl + alt + Cmd + D. Depending on where your TextMate window is positioned on screen, the drawer may show up on the left or the right. To switch it from one side to the other, close the drawer and drag the TextMate window to the left or right of the screen then re-open the drawer.

Text can be selected vertically which speeds up multi-line editing! Hold down the alt key and drag to select.

Minimal Design has some very helpful TextMate bundles on their site for a free download. These speed things up even more, by allowing you to type and tab to create your tags. See here for more info and the downloads.

For many other tips and tutorials, see the TextMate screencasts on the Macromates website.

other page

What do you think?

It's good to talk!

Your email address will not be published. Required fields are marked *