TextMate 1.5.7 Advanced Text Editor

1658 TextMate it is a high-end text editor for the Mac aimed approximately at the space occupied by Bare Bones Software's the venerable and very powerful BBEdit, or perhaps at a space that hasn't been filled adequately on the Mac platform up to now.

TextMate features include:
• folding of text blocks,
• recordable macros,
• snippets with dynamic content and tab-able placeholders,
• open files in tabs,
• column selection/typing,
• project management with file outline,
• smart-typing,
• extensive shell integration,
• and much more.

The TextMate interface window is simplicity itself, with no toolbars or buttons. However in the Cocoa drawer of the Textmate project window, there are four buttons that access menus and functions. You can show and hide the drawer (as well as the tab bar and status bar) from the View menu.




You can select text highlight colors.




Textmate features include:

Dynamic file outline

Lets you keep on top of your artifacts, such as stylesheets, includes, libraries, and application code. By arranging your files in an outline that follows the existing directory structure, it's no longer necessary to switch back and forth between Finder and editor to locate the next thing you need to work on.

The file outline is automatically kept up to date with changes occurring on the file system, so if you have a build script or generator that sprinkles files across multiple directories, they're instantly available in the outline.

You can also move files from one directory to another in the outline and the change is reflected on the file system. Just as you can easily add new files to any directory you select and they'll be placed as you'd expect.

Reorder the tabs

Once you've found the files you want, it's you can jump between them using tabs that can be reordered as you see fit. The outline overview allows for a greater number of files to be open at the same time; without constantly resorting to Expos, minimizing, or other window managing techniques for the big picture.

Clipboard history

Each time you copy something, it is thrown onto the stack, so all previous clips still exist. By holding down shift when you paste, you go one step back on this stack, so you can easily do multiple cuts and paste them again, or you can open the clipboard history window to inspect the stack.

Hide what you don't need with foldings

With foldings you can collapse method definitions in your class files or tables and divs in your markup. That way you only get the detailed view of the active segment while the rest is available at a glance.

The foldings automatically appear following a specification in the syntax files, so all you have to do is decide what to keep open and what to close.

This is a pretty cool feature, unlike anything I've seen in other text editors.

Macros: Record and replay

Whenever you find yourself repeating the same text or transformation, you have a good candidate for a macro. Macros let's you record just about any editing task you perform, including piping the selection through a Unix command, performing regular expression replaces, or just plain and simple movement of the insertion point.

There is a selection of default macros in an Automation menu submenu.




To record your own custom macros, you activate recording by selecting Start Macro Recording from the Automation menu, and when you have performed the editing operations, you select it again (the title has changed to Stop Macro Recording, and while it is recording, a camera icon will fade up and down in the status bar).

The editing operations recorded are:
• Moving the caret
• Selecting with the keyboard
• Inserting text by typing on the keyboard
• Copying and pasting text (including going back and forth in the clipboard history)
• Placing the selection on the find clipboard
• Finding next/previous match with the current contents of the find clipboard
• Execute Line Inserting Result and related functions
• Filter Through Command (the command you enter will be saved in the macro)
• Opening the find panel and doing a find/replace (the find string, replace string, and the options you set will be saved in the macro)
• Performing any of the transformations in the Text menu
• The miscellaneous select actions (word, line, ...)
• Executing another macro (the entire macro you execute is copied, so if you later change it, it will not affect the one you recorded)

After having recorded a macro you can replay it with Replay Scratch Macro from the Automation menu.

You can also save a scratch macro for later use. Select Save Scratch Macro from the Automation menu and give it a name and an optional key equivalent. This key equivalent does not need to include a modifier key.

Names and key equivalents for saved macros can be changed by opening the Replay Macro submenu and selecting Edit Menu.

Snippets

Snippets allow you to quickly insert text you type a lot. In this text you can embed placeholders (with default values) for where the insertion point should move to when pressing tab.




You can insert a snippet either by selecting it in the Insert Snippet submenu found under Automation, or by typing its trigger in a document and pressing tab.

In the most simple case, a snippet is just a sequence of text, for example you can let it be 2004 MacroMates. and set the trigger to cmm. If you then type cmm in your document (either at the beginning of a line or preceded by a non-word character) and press tab (?) then it will expand to 2004 MacroMates. (the trigger typed will be removed/replaced).

A snippet can either be inserted from the menu, or simply by entering the "trigger" and pressing tab, so e.g. typing "nsA" and pressing tab could insert "NSMutableArray* array = [NSMutableArray array]" and leave the former "array" selected (the placeholder).

Placeholders

It would be nice to make this useful even in a year from now, so hard coding 2004 obviously does not work. We can instead insert a placeholder using $1. This is done by changing the snippet to $1 MacroMates.. When we insert this snippet, it will place the caret where $1 is written ($1 will not be inserted in the document), and then we can type the current year.

Default placeholder values

Since the year will be 2004 for at least some months to come, we can make this the default value by writing ${1:2004}, so the snippet becomes ${1:2004} MacroMates.. What happens when we insert this snippet is that it will insert 2004 MacroMates., just like the first version, but 2004 will be selected, so we can either overtype it, or leave it alone.

Multiple placeholders

Since a snippet may contain several pieces which must be typed when inserted, we can embed several placeholders and cycle between them with tab and shift tab, for example we could let it be ${1:2004} ${2:MacroMates}.$3. When we insert this snippet, it will once again insert 2004 MacroMates. with the year selected. Now we can either decide to overtype the year, or leave it as is. After this we press tab to move to the next placeholder, which causes MacroMates to be selected. Again we can decide either to overtype it, or let it be. After this, we can go back to the year with shift tab, or we can move forward to the last placeholder ($3) with tab.

When we reach the last placeholder, we leave the cycle-chain, and can no longer use shift tab to go backwards.

Mirror typing

If the same word or phrase needs to appear at different positions in the snippet, you can re-use the placeholder number to activate mirror typing when the snippet is inserted. An example follows.


${1:MyPage}



${1:MyPage}


$2






When this snippet is inserted, MyPage in the title will be selected. Overtyping it will cause MyPage in the

...

section to reflect the changes made to the title. When done, press tab, and the caret will move inside the

section.

Note that mirror typing will not work for the last placeholder, since it would not be possible to dismiss it, as there are no defined placement of the caret when pressing tab after having moved to the last placeholder (here tab inserts a tab, rather than advance to the next placeholder).

Also note that currently if you provide a placeholder with a default value, you must add this same default value to all of the mirrors.

TextMate builds on Cocoa's key binding mechanism, which is completely re-mappable by the user.

Project-wide regexp search'n'replace

Find advanced patterns of text across all files in the project and replace them with elements from the match.

Jump around with bookmarks

Bookmark lines in different files across the project and jump or cycle between them with ease.

Virtual groups in the file outline
Impose even more structure on the files in your project than the file structure affords. Especially useful to keep header and class files separate even as they reside in the same physical folder.

Syntax highlighting in a nest

Colors and styles allows you to separate code from markup, keys from values, and tags from options.

HTML prototyping with Web Preview

Stop jumping back and forth between the editor and your browser to refresh how your change affected the design. Instead let TextMate refresh a WebKit-based rendering of your site on every keystroke.

More Automation Features

Smart typing

Opening a single- or double quote, curly or regular bracket, or parentheses will automatically create the closing match and place the cursor within.

Column typing

Perform the same change across multiple lines without repeating it.

Auto-complete words

If the word Basecamp has already been mentioned in the current text, you can write "Bas" and hit escape to have the word completed. Multiple matches can be cycled through hitting escape repeatedly.

David notes that TextMate is under rapid development, and are releasing new beta versions almost daily. More features coming soon in TextMate include:

Editing over Secure FTP (1.1)

Work on files residing on another machine using Secure FTP.

New in version see:
http://macromates.com/screencasts

System requirements:
Mac OS X 10.3.9 or later.

System support
PPC/Intel

$49 :Shareware

For more information, visit:
http://macromates.com/



Tags: Software Updates ď Writing/Publishing ď

Login † or † Register † †

Follow Us

Twitter Facebook RSS! http://www.joeryan.com Joe Ryan

Most Popular

iPod




iPhone

iLife

Reviews

Software Updates

Games

Hot Topics

Hosted by MacConnect - Macintosh Web Hosting and Mac Mini Colocation                                                    Contact | Advanced Search|