TextMate

From Wikipedia, the free encyclopedia - View original article

TextMate
TextMate icon
Developer(s)Allan Odgaard (MacroMates), Ciarán Walsh
Stable release1.5.11 (r1635) / 13 July 2012; 20 months ago (2012-07-13)
Preview release2.0-alpha (9529) / 31 March 2014; 21 days ago (2014-03-31)
Operating systemOS X
TypeText editor
License

2.0: GNU General Public License

1.0: Proprietary
Websitehttp://www.macromates.com/
 
Jump to: navigation, search
TextMate
TextMate icon
Developer(s)Allan Odgaard (MacroMates), Ciarán Walsh
Stable release1.5.11 (r1635) / 13 July 2012; 20 months ago (2012-07-13)
Preview release2.0-alpha (9529) / 31 March 2014; 21 days ago (2014-03-31)
Operating systemOS X
TypeText editor
License

2.0: GNU General Public License

1.0: Proprietary
Websitehttp://www.macromates.com/

TextMate is a general-purpose GUI text editor for Mac OS X created by Allan Odgaard. Notable features of TextMate include declarative customizations, tabs for open documents, recordable macros, folding sections, snippets, shell integration, and an extensible bundle system.

History[edit]

TextMate 1.0 came out on 5 October 2004, after 5 months of development, followed by version 1.0.1 on 21 October 2004.[1][2][3] The release focused on implementing a small feature set well, and did not have a preference window or a toolbar, didn’t integrate FTP, and had no options for printing.[4][5] At first only a small number of programming languages were supported, as only a few “language bundles” had been created. Even so, some developers found this early and incomplete version of TextMate a welcome change to a market that was considered stagnated by the decade-long dominance of BBEdit.[6]

TextMate 1.0.2 came out on 10 December 2004. In the series of TextMate 1.1 betas, TextMate gained features: a preferences window with a GUI for creating and editing themes; a status bar with a symbol list; menus for choosing language and tab settings, and a “bundle editor” for editing language-specific customizations. On 6 January 2006, Odgaard released TextMate 1.5, the first “stable release” since 1.0.2.[7] Reviews were positive, and many who had previously criticised the program now endorsed it.[8]

TextMate continued to develop 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.”[9] 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.[10] Those changes, however, have been slow to materialize. Throughout 2007, the core application changed only minimally, though its “language bundles” continued to advance.

In June 2009, TextMate 2 was announced to be in development and about 90 percent complete, but which features it would include wasn't disclosed.[11] A public alpha was made available for download on the TextMate blog in December 2011, but as of October 2012, a final version has yet to be released.[12]

In August 2012, TextMate 2’s source code was published on GitHub under the terms of the GNU General Public License.[13] It remains a commercial product, however, and users are required to purchase a license from Macromates.[14]

Features[edit]

Nested scopes[edit]

TextMate allows users to 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.

Therefore, each point of a document 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, 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 various levels of coverage, so that each one can choose to opt for simplicity or comprehensiveness, as desired.

Commands[edit]

TextMate supports user-defined and user-editable commands that are interpreted by bash or the interpreter specified with a shebang. Commands can be sent many kinds of input by TextMate (the current document, selected text, the current word, etc.) in addition to environment variables and their output can be similarly be handled by TextMate in a variety of ways. At its most simple, a command might receive the selected text, transform it, and re-insert it into the document replacing the selection. Other commands might simply show a tool tip, create a new document for their output, or display it as a web page using TextMate's built-in HTML renderer.

Many language-specific bundles such as bash, PHP or Ruby contain commands for compiling and/or running the current document or project. In many cases the result (STDOUT and STDERR) of running the code will be displayed in a window in TextMate.

Snippets[edit]

At their simplest, TextMate “snippets” are pieces of text which can be inserted into the document at the current location. 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.

Bundles[edit]

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 special keys such as the return key and spacebar can be overridden.

A Subversion repository is available containing many more bundles than are shipped with the editor package, for everything from Markdown to blogging to MIPS assembly language.[15]

Project management[edit]

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[edit]

TextMate has several other notable features:

Limitations[edit]

TextMate does have a few limitations when compared to other editors in its class:

Community[edit]

TextMate has a community of users, who contribute to the open-source bundle[20] Subversion repository. The TextMate wiki has hints and tips, feature suggestions, and links to external resources. A ticket system exists for filing bug reports and feature requests, and an IRC channel (#textmate) is usually active.

TextMate users write code in many dozens of programming languages, and bundles have been written to support these. The Ruby and Ruby on Rails bundles are supported David Heinemeier Hansson, Ruby on Rails’ creator.

Other operating systems[edit]

There are no plans for a Windows/Linux port, as of 2013.[21]

Awards[edit]

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

See also[edit]

Notes[edit]

  1. ^ David Hansson. “TextMate 1.0 is finally here!”, TextMate Blog, 5 October 2004.
  2. ^ Allan Odgaard. “Profiles/Allan Odgaard” on the TextMate wiki, 20 November 2005.
  3. ^ David Hansson. “TextMate 1.0.1 emerges after nine betas”, TextMate Blog, 21 October 2005.
  4. ^ Matt Willmore. “TextMate 1.0.1 Review: A Checkmate for TextMate?”, Maczealots.com, 8 October 2004.
  5. ^ Michael “drunkenbatman” Bell. “TextMate: The Missing Editor for OS X”, Drunkenblog, 4 November 2004.
  6. ^ Kimbro Staken. “A cool new text editor - TextMate - Mac OS X”, Inspirational Technology, 6 October 2004.
  7. ^ Allan Odgaard. “TextMate 1.5”, TextMate Blog, 6 January 2006.
  8. ^ Rui Carmo. “Third Time’s The Charm”, Tao of Mac, 8 January 2006.
  9. ^ John Gruber. “ADA: TextMate 1.5.2”, Daring Fireball Linked List, 8 August 2006.
  10. ^ Allan Odgaard. “Future Directions”, TextMate Blog, 15 February 2006.
  11. ^ TextMate Blog: Working on It, 14 June 2009
  12. ^ TextMate Blog: [1], Dec 13, 2011
  13. ^ GitHub, [2], Aug 9, 2012
  14. ^ [3]
  15. ^ For information on getting more bundles, see the relevant section in the TextMate manual.
  16. ^ "20 Regular Expressions". TextMate. Retrieved 2009-04-28. 
  17. ^ Support accessibility in text view - VoiceOver and Zoom. GitHub pull request
  18. ^ Allan Odgaard. “Re: Changing cursor position from command”. TextMate mailing list. 14 February 2007.
  19. ^ How to edit files from my FTP Server as a TextMate project. TextMate Wiki - FAQ: Projects
  20. ^ Manual.macromates.com
  21. ^ TextMate Wiki, 2013-08-21

Further reading[edit]

External links[edit]