FAQ

Frequently Asked Questions

Version 2.0 – revamped by Soryu

Table of Contents

General

top

Keywords: customers buy
Q: How to buy Textmate if my country is not listed in the checkout?

A: Email tm-sales at this domain.

Keywords: universal binary intel
Q: Is TextMate a Universal Binary that will run on Intel Macs?

A: Yes. TextMate has been universal for some time now. The website does not feature the Universal Binary Logo proposed by Apple, though, for aesthetic reasons.

Keywords: completion codesense intellisense
Q: Does TextMate have code completion, e.g. type a variable name and see all member data for that variable (object)?

A: No.

What it does have is word completion based on current buffer and insertion of snippets or commands using tab triggers. There is also a PHP code completion bundle that adds completion and help for native PHP functions.

Keywords: smart typing pairs
Q: How can I "tab out" of a pair of brackets (), {}, [], ... when my insertion point is in between them? Pressing the right arrow key seems rather tedious to me.

A: There's no shortcut — the purpose of the auto-pairs is mostly to ensure proper balancing (while typing), and allowing the selection to be wrapped. ⌃F is emacs-style for move one character forward and works well in this case. One could create own auto-pairs via snippets that allowed the tabbing, but often tab is useful inside the pairs, at least for {}.

Keywords: smart typing pairs snippet
Q: ... Has anyone made snippets that would do this? I too find the right arrow tedious, and the tab works well in other editors (notably Eclipse).

A: Creating your own is: [$1] and set the key equivalent to [. Possibly make it: [${1:$TM_SELECTED_TEXT}] so that when activated with a selection, the selection gets wrapped. See this blog entry for more information about snippets.

Keywords: automatic trigger file
Q: Is it possible to trigger a Command/Macro like “Strip trailing spaces” (“Zap Gremlins”) automatically when saving a file?

A: Please see this Mailing List Thread.

I am currently (amongst other) looking into extending commands to be used in various (callback) events, and directly on files (from the file browser). So long-term the way to strip trailing spaces (and similar) will be a method very similar to this (but with a slightly extended infrastructure to make it more graceful).

Keywords: tabulator overwrite indent
Q: When I try to indent text via Tabulator (⇥) it will overwrite my selection / Is there an alternative to ⌘[ and ⌘] for shift left/right (indent)?

A: You can use ⌥⇥ and ⇧⌥⇥ instead (the latter should really be shown as ⌥⇤, i.e. option backtab, but backtab is shift tab).

Keywords: port windows linux
Q: Is there/Will there be a Window or Linux port of TextMate?

TextMate is only for Mac OS X, here are some alternatives.

Keywords: bug report
Q: How do I report bugs?

A: Please see the BugReporting page.


Projects

top

Keywords: ftp remote external editing server
Q: How can I edit files from my FTP Server as a TextMate project? I'm using Transmit/CyberDuck/Fugu/(any other FTP client) and the external Editor feature to edit my files directly on the server in TextMate?

A: You can't actually do this, the External Editor Protocol implemented by TextMate and those FTP clients does only allow for one file to be edited. There are various approaches. You can download all the files locally and synch the changes back the server using the Synchronize feature of your FTP client or command line tools like rsync or unison. You could (should) use a Version Control System (SVN/CVS/darcs/…) to check in your files and deploy them to the server.

Instructions for using rsync to enable the project drawer.

However there is a hack which might do what you want. Please read this Post from the Mailing List. This comes however without warranty.

Another possibility is to use ExpanDrive which lets you mount SFTP connections as a remote disk that is usable within TextMate.

Try also the FTP/SSH Bundle which allows you to get files from a remote server and save them back using FTP or SSH from within TextMate. Login credentials are entered into a dialog box and used for a whole project or just a directory of single files.

Keywords: transmit beep
Q: Why does Transmit constantly beep when saving an externally edited file in Transmit?

A: This is a problem with Transmit and should have been fixed in latest version of Transmit.

Keywords: project drawer update static
Q: Is there a way to disable the automatic update of the Project Drawer? Since I'm editing files that are located on a slow network drive (DAV) it takes several seconds before TextMate becomes responsive when I tab back to it.

A: You can create a static (thus non-updating) project by dragging files (instead of folders) to the project drawer.

A script to create a (static) tmproj file from a folder can be found here (save as build_project.sh and chmod a+x build_project.sh and run it like so ./build_project.sh myfolder/ > myproject.tmproj).

Another workaround is to use a desktop manager program which allows you to have multiple desktops, which prevent an application from losing focus which switching.

http://www.macupdate.com/info.php/id/16530


Commands

top

Keywords: command path shebang ruby
Q: When I run «some command» I get: env: ruby: No such file or directory

A: This is because Ruby couldn't be found. Likely because you have removed ruby from /usr/bin/ruby (to install latest version e.g. in /opt/local/bin).

So first figure out where ruby is on your system, in a new TextMate document type the following line and press ⌃R to execute it as a shell command:

 
type -p ruby
 

Then to figure out which (global) PATH is setup (for shebang-scripts) on your system, insert these two lines (in a new TextMate document), select both, and again press ⌃R (to run “the script”):

 
#!/bin/sh
echo "$PATH"
 

This gives a colon-separated list of locations that will be searched for the ruby executable. If the location in which you keep ruby is not listed, you will have to add it to the “global” PATH.

For information about that, see the shell commands chapter in the manual (scroll down to the paragraph which starts with “Important”).

Keywords: todo list support
Q: The “Show TODO List” Command does not work anymore

A: This command has been greatly enhanced and needs an SVN checkout of the Support directory as well. Please see here for details.


Bundles/Languages

top

Keywords: php html highlight
Q: My PHP files are not coloured correctly; e.g. if I write an ' in the text, it highlights from that point and the rest of the source as a (single quoted) string.

A: For PHP files always set the language (via the status bar) to HTML, since they are HTML files, and only inside <?php … ?> should PHP highlighting happen, which TextMate will ensure when the top-language is HTML. Similar for the context sensitive snippets, commands, and macros.

Keywords: rails tab trigger
Q: When I try to use one of the commands or snippets from the Ruby on Rails bundle they don't respond to the shortcuts or triggers.

A: Switch the language to Ruby on Rails by clicking the language pop-up selector in the status bar.

This will instruct TextMate to treat your “.rb” files as Rails files (no, you won’t have to do this for each file opened, the change is sticky.)

Keywords: source bundle disabled
Q: TextMate is acting funny, I can't comment/uncomment source code anymore, the symbol list does not work anymore, etc.

A: Please check that you do not have the Source Bundle disabled (Using the “Filter List…” button in the Bundle Editor). The Source as well as the Text Bundle contain settings other languages rely upon.

Keywords: bundle loading startup
Q: It seems Bundles I have disabled in the Bundle Editor are still loaded when starting TextMate / TextMate needs a long time to start up

A: Starting with r1021 this is no longer the case.


Special Interest

top

Keywords: irc channel freenode policy
Q: Why does the TextMate IRC channel have two number signs (##textmate)

A: This is FreeNode policy. TextMate is not F/OSS software, so the channel is “about” TextMate, and “about” channels get two number signs (“primary” channels use one).