TextMate

TextMate

Infobox Software
name = TextMate



caption =
developer = Allan Odgaard (MacroMates)
latest_release_version = 1.5.7 (r1466)
operating_system = Mac OS X
genre = text editor
license = Proprietary
website = http://www.macromates.com/

TextMate is a general-purpose GUI text editor for Mac OS X, created by Allan Odgaard. It supports declarative customizations which are at once transparent and flexible. Like vi or emacs, its users are mostly programmers [See [http://macromates.com/wiki/Polls/WhichLanguageDoYouUse this poll] at the TextMate wiki for most commonly used languages.] , and many of its users publish the customizations they make. It's also used at least occasionally for screenwriting [ [http://macromates.com/screencasts Screencasts — TextMate ] ] . Notable features include tabs for open documents, recordable macros, folding sections and snippets, shell integration, and an extensible bundle system.

TextMate 1.5 won the Apple Design Award for best developer tool in 2006.

History

In 2004, Allan Odgaard, unsatisfied both with existing Macintosh text editors such as TextEdit, BBEdit, and Xcode, which he felt were inflexible and limited, and with Unix editors such as Vim and Emacs, which do not feel like native Mac applications, set out to create a text editor. TextMate 1.0 came out on 5 October 2004, after only 5 months of full-time development, quickly followed on 21 October 2004 by 1.0.1. [David Hansson. “ [http://macromates.com/blog/archives/2004/10/05/hello-world/ TextMate 1.0 is finally here!] ”, "TextMate Blog", 5 October 2004.] [Allan Odgaard. “ [http://macromates.com/wiki/Profiles/AllanOdgaard Profiles/Allan Odgaard] ” on the TextMate wiki, 20 November 2005.] [David Hansson. “ [http://macromates.com/blog/archives/2004/10/21/textmate-101-emerges-after-nine-betas/ TextMate 1.0.1 emerges after nine betas] ”, "TextMate Blog", 21 October 2005.] The release focused on implementing a small feature set well, and did not have a preference window or a toolbar, didn’t integrate FTP as BBEdit does, and had no options for printing, to the chagrin of some reviewers, who didn’t know what to make of the spartan editor window. [Matt Willmore. “ [http://maczealots.com/reviews/textmate/ TextMate 1.0.1 Review: A Checkmate for TextMate?] ”, "Maczealots.com", 8 October 2004.] [Michael “drunkenbatman” Bell. “ [http://www.drunkenblog.com/drunkenblog-archives/000347.html TextMate: The Missing Editor for OS X] ”, "Drunkenblog", 4 November 2004.] At the beginning only a small number of programming languages were supported, as only a few “language bundles” had been created. On the other hand, many raved about its unique features, and welcomed a new editor to a market they felt had stagnated with the dominance of BBEdit. [Kimbro Staken. “ [http://www.xmldatabases.org/WK/blog/2129_A_cool_new_text_editor_-_TextMate_-_Mac_OS_X.item A cool new text editor - TextMate - Mac OS X] ”, "Inspirational Technology", 6 October 2004.]

Over the next year after TextMate 1.0.2, which came out on 10 December 2004, a series of TextMate 1.1 betas shipped, and the program steadily improved, in the process picking up a preferences window with a GUI for creating and editing themes, a status bar with a symbol list, and menus for choosing language and tab settings, a “bundle editor” for editing language grammars, commands, snippets, etc., and lots of general polish. Then on 6 January 2006, MacroMates released TextMate 1.5, the first “stable release” since 1.0.2. [ Allan Odgaard. “ [http://macromates.com/blog/archives/2006/01/06/textmate-15/ TextMate 1.5] ”, "TextMate Blog", 6 January 2006.] Reviews were overwhelmingly positive, and many reviewers who had previously found fault with the program now enthusiastically endorsed it. [Rui Carmo. “ [http://the.taoofmac.com/space/blog/2006-01-08 Third Time’s The Charm] ”, "Tao of Mac", 8 January 2006.]

TextMate continued to develop at a rapid rate through mid-2006. On 8 August 2006, TextMate was awarded the Apple Design Award for Best Developer Tool, at Apple’s Worldwide Developers Conference in San Francisco, California, to “raucous applause.” [John Gruber. “ [http://daringfireball.net/linked/2006/august#tue-08-textmate ADA: TextMate 1.5.2] ”, "Daring Fireball Linked List", 8 August 2006.] Soon thereafter, it was the “Featured Download” among developer tools at Apple’s website. [ [http://www.apple.com/downloads/macosx/development_tools/ Development Tools downloads] at Apple.com. TextMate is the “Featured Download”. Accessed 13 August 2006] In February 2006, the TextMate blog expressed intentions for future directions, including improved project management, with a plug-in system to support remote file systems such as FTP, and revision control systems such as Subversion. [Allan Odgaard. “ [http://macromates.com/blog/archives/2006/02/15/future-directions/ Future Directions] ”, "TextMate Blog", 15 February 2006.] Those changes, however, have been slow to materialize. Throughout 2007, the core application changed only minimally, though its “language bundles” continued to advance.

Features

TextMate has several features which set it apart from other editors. Its customizable macros, commands, and snippets allow complex behavior to be automated, and its CSS-inspired scope system, unique among text editors, allows arbitrarily complex nested syntax highlighting.

Nested scopes

TextMate allows users to easily create their own arbitrarily complex syntax highlighting modes by using a modified version of the Apple ASCII property list format to define language grammars. These grammars allow nesting rules to be defined using the Oniguruma regular expression library, and then assigned specific “scopes”: compound labels which identify them for coloration.

Each point of a document therefore is assigned one or more scopes, which define where in the document the point is, how it should be colored, and what the behavior of TextMate should be at that point. For instance, the title of one of the links in the “External links” section has the scope:

text.html.mediawiki markup.list.mediawiki meta.link.inline.external.mediawiki string.other.link.title.external.mediawiki

This scope tells us that we are looking at a link title within a link within a list within a MediaWiki document.

TextMate themes can mark up any scope they choose, at varying levels of precision. For instance, one theme may decide to color every constant (constant.*) identically, while another may decide that numerical constants (constant.numeric.*) should be colored differently than escaped characters (constant.character.escape.*). The nested scope syntax allows language authors and theme authors differing levels of coverage, so that each one can chose to opt for simplicity or comprehensiveness, as desired.

Macros

TextMate, like many other editors before it, allows users to record a series of actions in a temporary macro, for automating repetitive tasks. Useful macros can be saved for later use. Macros can string together other automation features, including other macros.

Snippets

At their simplest, TextMate “snippets” are useful snippets of text which can be inserted into the document at the current location. But more complicated behaviors are possible, based on a few useful generalizations of this idea. First, snippets can include one or more “tab stops”, which can be cycled through using the “tab” key. Second, the results of these tab stops can be dynamically changed in another portion of the snippet, as the user fills in the stop. Third, the snippets have access to TextMate environment variables such as current scope, current line number, or author name, and also have the ability to run inline shell scripts.

Commands

Like many other programmers’ text editors, TextMate allows users to execute shell scripts with keyboard shortcuts. Because TextMate commands read a shebang line to determine how they should run, it is possible to write commands in any scripting language, including bash, Ruby, Python, Perl, and AppleScript. The text of the document can be piped to stdin, and scripts can access document state via special environment variables. Several output options are possible, such as displaying a WebKit view in a separate window, replacing the selected text, or inserting text as a snippet. Using AppleScript, TextMate commands can interact with other Mac programs.

Bundles

TextMate language grammars, snippets, macros, commands, and templates can be grouped into “bundles” of functionality. Any snippet, macro, or command can be executed by pressing a keyboard shortcut, by typing a particular word and then pressing the “tab” key (so-called “tab triggers”), or by selecting the command from a menu. Tab triggers are particularly useful; the combination of tab triggers and snippets greatly eases coding in verbose languages, or languages with commonly-typed patterns.

Snippets, macros, and commands can be limited to a particular scope, so that for instance the “close html tag” command does not work in a python script, freeing up that keyboard shortcut to be used for something else. This allows individual languages, and even individual scopes, to override built-in commands such as “Reformat Paragraph” with more specialized versions. Even common key such as the return key and spacebar can be overridden to make coding seamless.

36 bundles ship with TextMate, but a Subversion repository contains 121 bundles, for everything from Markdown to blogging to MIPS assembly language. [For information on getting more bundles, see the [http://macromates.com/textmate/manual/bundles#getting_more_bundles relevant section in the TextMate manual] .]

Project Management

Several documents or folders can be opened at once in a TextMate project window, which provides a drawer along its side listing file and folder names, and a series of tabs across the top. Search and replace can be undertaken across an entire project, and commands can interact with the selected files or folders in the drawer. Bundles for CVS, Subversion , darcs, and other revision control systems allow TextMate to manage versioned code.

Other features

TextMate has several other notable features:

* Folding code sections can be used to hide areas of a document not currently being edited, for a more compact view of code structure or to avoid distraction. The sections to be folded can be selected by hand, or the structure of the document itself can be used to determine foldings.
* Regular-expression–based search and replace speeds complicated text manipulations.
* A function pop-up provides a list of sections or functions in the current document.
* Clipboard history allows users to cut many sections of text at once, and then paste them.
* A column editing mode trivializes adding the same text to several rows of text, and is very useful for manipulating tabular data.
* A WebKit-based HTML view window shows live updates as an HTML document is edited.

Limitations

TextMate does have a few limitations:

* There is no support for variable-width or wide fonts, meaning that languages such as Chinese, Japanese, Korean, and others are not really supported, as their characters are wider than latin characters.
* There is no right-to-left support for languages such as Arabic and Hebrew.
* Large (many megabyte) files can slow TextMate considerably. Other editors have better support for large files.
* TextMate has no built-in support for (S)FTP, though such support is planned for TextMate 2.0. There are some workarounds mentioned at the TextMate Wiki. [ [http://wiki.macromates.com/Main/FAQ#projects How to edit files from my FTP Server as a TextMate project] . "TextMate Wiki - FAQ: Projects"]
* Because TextMate is not tightly coupled to a scripting language, as Emacs is to elisp, it is impossible for users to have complete control over the behavior of some built-in commands such as those which indent sections of text or those which move columns around; however, almost every useful action can be accomplished with TextMate’s macros and commands. Allan Odgaard explained his thoughts on the subject in an email to the TextMate mailing list. [Allan Odgaard. “ [http://comox.textdrive.com/pipermail/textmate/2007-February/017457.html Re: Changing cursor position from command] ”. "TextMate mailing list". 14 February 2007.]
* No built-in HTML validator — because TextMate uses the W3C validator for HTML validation, users must be online to validate HTML.
* No support for split views

Easter Eggs

On Halloween 2006, TextMate’s program icon changed to a spooky jack-o’-lantern instead of the standard purple gear. A “Halloween” theme was created for HTML previews, and a spider web showed up in empty project windows.

Community

TextMate has a large and active community of users, dozens of whom contribute to the open-source [http://manual.macromates.com/en/bundles bundle] subversion repository. The TextMate wiki has many hints and tips, feature suggestions, and links to external resources. The mailing list has medium traffic, but with a relatively high signal-to-noise ratio. A ticket system exists for filing bug reports and feature requests, and an IRC channel ( [irc://irc.freenode.net/#textmate #textmate] ) is usually full of vibrant chatter.

Though TextMate users write code in many programming languages, TextMate’s Ruby and Ruby on Rails support is notable because most of Rails’ core developers use Mac OS X and TextMate, including David Heinemeier Hansson, Rails’ creator.

Versions for other platforms

Allan has received numerous requests for Microsoft Windows and Linux versions of TextMate, but has publicly stated that he has no interest in making an official port. [Odgaard, Allan. “ [http://macromates.com/blog/2005/windowslinux-alternative/ Windows/Linux Alternative?] ” "TextMate Blog", 7 November 2005.]

Clones for Windows

* E Text Editor [“ [http://e-texteditor.com/blog/2006/textmate_on_windows The Power of Textmate on Windows] ”, "E Text Editor Blog", 20 November 2006.]
* [http://intype.info/home/index.php Intype] [“ [http://intype.info/faq/#faq-basic-6 Is Intype a clone of TextMate?] ” "Intype Frequently Asked Questions", Accessed 21 November 2006]

Notes

Further reading

* cite book
last = Gray
first = James Edward II
title = Textmate: Power Editing for the Mac
publisher = Pragmatic Bookshelf
year = 2007
month = January
isbn = 097873923X
url = http://www.pragmaticprogrammer.com/titles/textmate/

External links

* [http://www.macromates.com/ Official TextMate website]
* [http://textmate.org/ TextMate Community]


Wikimedia Foundation. 2010.

Игры ⚽ Нужна курсовая?

Look at other dictionaries:

  • TextMate — Développeur Allan Odgaard Dernière version 1.5 …   Wikipédia en Français

  • TextMate — Basisdaten Entwickler Allan Odgaard (MacroMates) Aktuelle Version 1.5.10 …   Deutsch Wikipedia

  • Textmate — Basisdaten Entwickler: Allan Odgaard (MacroMates) Aktuelle Version: 1.5.8 rev. 1498 (11. Februar 2009) …   Deutsch Wikipedia

  • TextMate — Desarrollador Allan Odgaard (MacroMates), Ciarán Walsh www.MacroMates.com Información general Última versión estable 1.5.10 12 de noviembre de …   Wikipedia Español

  • TextMate — Тип текстовый редактор Разработчик Allan Odgaard (MacroMates), Ciarán Walsh Операционная система Mac OS X Аппаратная платформа x86 Последняя версия 1.5.10 (1631) (14 марта 2011) Лицензия …   Википедия

  • Comparison of text editors — This article provides basic comparisons for common text editors. More feature details for text editors are available from the Category of text editor features and from the individual products articles. This article may not be up to date or… …   Wikipedia

  • E Text Editor — Stable release 2.0.1 / November 30, 2010; 11 months ago (2010 11 30) Operating system Microsoft Windows Type Text editor …   Wikipedia

  • E (text editor) — infobox software name = E Text Editor caption = e editing a Ruby source file latest release version = 1.0.30 latest release date = 19 September 2008 operating system = Microsoft Windows genre = Text editor license = Proprietary website = http://e …   Wikipedia

  • Comparison of revision control software — The following is a comparison of revision control software. The following tables includes general and technical information for notable revision control and software configuration management (SCM) software. This is an incomplete list, which may… …   Wikipedia

  • Programmiersprache D — D Paradigmen: imperativ, objekt orientiert, generisch, modular Erscheinungsjahr: 2007 Entwickler: Walter Bright Aktuelle  …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”