0

I have installed Textmate editor on my terminal and I am looking for some tutorial to discover Textmate's command lines ? Does anyone has a some links ?

Best, Newben

epsilones
  • 11,279
  • 21
  • 61
  • 85
  • what do you mean "command lines"? if you want to use it from terminal then jsut do `mate path/to/file/you/want/to/edit.txt` – prodigitalson Jun 22 '12 at 20:48
  • For sure I know. In fact i would like to know benefits to use textmate from terminal ? – epsilones Jun 22 '12 at 20:50
  • its just easier to open files that way sometimes... plus you can set it as `EDITOR`, `SVN_EDITOR` etc. if youd rather have a GUI text editor for things instead of `vi`, `emacs`, etc.. – prodigitalson Jun 22 '12 at 20:52
  • ok, but I already have aliases on my .bashprofile that allows me to open files with an o(open)tm(-a TextMate) command :) – epsilones Jun 22 '12 at 20:57

2 Answers2

1

The textmate bin that is optionally installed for command line access is really nothing but a simple manner to open files in the OSX gui application.

That said, there are a few handy shortcuts. -w issues a "wait" while opening the file, thus following commands in a sequence will wait until the document is closed to execute. For example:

alias bashrc="mate -w ~/.bashrc; source ~/.bashrc"

That said, if you are looking for a good command set for using within the gui itself, let me know and I will fill in a list of handy commands (it has been my default editor for 6 years now).

Edit: Here are the beginnings of my TextMate docs. I currently have the Cheat Sheet in a state that should prove useful. I will be adding to it and writing up some more extensive docs in the near future.

TextMate Cheat Sheet

Ben Roux
  • 7,308
  • 1
  • 18
  • 21
  • Thanks ! I would be very interested to know about those handy commands – epsilones Jun 22 '12 at 20:54
  • No problem. I have been meaning to take some time and write up a sort of cheat sheet regarding using Textmate. I'll crank one out on Github tonight and link it to this response. – Ben Roux Jun 22 '12 at 22:07
  • 1
    I have added the start of the cheat sheet to my answer. I basically lists every global command I use on a daily/semi-daily basis. I have not made any mention of Bundles and Snippets (the true workhorse of TextMate) – Ben Roux Jun 23 '12 at 03:34
0

You can invoke it from the command line with:

mate path/to/file/you/want/to/edit.txt

You can use more than one file, space separated. To see more options do:

mate --help

This if you installed the commandline option. which you can also do from preferences at any time (its just a symlink)

prodigitalson
  • 60,050
  • 10
  • 100
  • 114