

In your ~/.ssh/config file, create an entry for each remote server as follows: Host nimitz You also need to create a reverse tunnel when you ssh for rmate to work.
TEXTMATE COMMAND LINE DOWNLOAD
Type in the following commands to download the script and enable it’s execution: curl -Lo /usr/local/bin/rmate To set up rmate on the server, ssh into the server and use sudo if necessary. vi works great for simple edits, but I use rmate from these remote machines to launch TextMate 2 on my computer to perform more complex edits. I also ssh to a lot of virtual servers to edit and maintain them. Then you can just type mate to open a file for editing from anywhere.
TEXTMATE COMMAND LINE INSTALL
To install the mate command, open Preferences…, click on the Terminal tab and click install. Since I spend most of my day in the shell, I use the mate command a lot to open and edit files in TextMate 2. Note that in the current alphas of TextMate 2, you need to restart the application for the favorites to be updated. Next time you want to open an project, just press ⇧⌘O (O not zero) to open the Open Favorite dialog, then type or click to open the project. Then, to create a favorite, right click on the project folder and choose “Add to Favorites”. To set up a favorite, use the file browser in TextMate 2 to navigate to the folder above your projects. In TextMate 2, the Favorites feature works better for me. to open the project folder (and then created TextExpander scripts to do this, see TextExpander in Terminal). So I used to open projects by opening a terminal, cd to the project folder and type the command mate.

In TextMate 1 we had project files, but I never really used them. I find myself opening the same projects over and over again in TextMate 2. To set the default file type, open Preferences… and on the Files tab, set your preferred new document type. I set it to my most common format, Ruby, as most of the time, that’s what I need. In TextMate 2, the shipped default is a plain text file which really makes no sense in a programmer’s editor. ⌘N is a programmer’s friend, it creates a new file in any editor. That is how I found the available snippets and keystrokes that I use every day. Type in what you think could exist or what it may be called, and chances are, there it is. Or best of all, use ⌘⌃T to bring up the bundle search dialog to find what’s there.

Or you could click on the gear menu (see image right) at the bottom of an opened file to see what’s available. You could go to the Bundle / Edit Bundles… menu (or press ⌃⌥⌘B) and then click on a bundle to see its contents. There are many ways to learn about what’s in a bundle. Or just open an unrecognized file and TextMate 2 will recommend a bundle to install. Check a bundle to install, uncheck to remove. To install a language or feature bundle, open Preferences… or press ⌘, and click on Bundles. In the good old days when TextMate 1 was still growing, this prevented keystroke and scope conflicts. I don’t install all the bundles, I only install them as needed (and remove the ones I do not need).
TEXTMATE COMMAND LINE CODE
There are bundles for programming languages, build systems, source code control, testing languages and odd file formats. Whether you code in Ruby and Shell like I do, or in some esoteric language, chances are that there is a bundle that will not only provide syntax highlighting for that language but include a whole bunch of snippets to make programming easier. The true power of TextMate can be found in its bundles. I’ll assume you know the platform keys and features and move on to the TextMate features straight away. It uses all of the standard Apple keystrokes and text features so that I do not have to know another set.

Note that it all starts with the fact that TextMate 2 is the most Mac-like of programmer’s editors. So here are the basic parts of TextMate 2 that I use regularly. I’ve been speaking with users of other awesome programmer’s editors and they wanted to know what it is in TextMate that I love so much and keeps me using it. I have been using TextMate for years as my primary programmer’s editor, but it turns out that I only use a subset of its amazing features.
