TextMate がオープンソース化されたのでインストールした

Mac OX 向けテキストエディタTextMateオープンソース化された。

TextMate の存在を初めて知ったのは YouTube で、Google のエンジニアが Google App Engine の使い方をデモを交えながら軽快に解説するみたいな動画があって、その動画のデモで使われていたのが TextMate だった。直感的にいいなと思って調べたら 50 ドルくらいして、ちょっと高いなあと思いつつ 30 日のトライアルを試した後に使うのをやめてしまった。その後は Vim と CotEditor を使っていた。

それが今回オープンソース化され、GitHub にソースが上がっているとのことなので、ダウンロードしてインストールしてみた。

前提

手順

まずは GitHub からソースをダウンロードする。

$ git clone https://github.com/textmate/textmate.git

Git がインストールされていない場合はインストール。

sudo port install git-core

参考

ちなみに、MacPorts を使うには The MacPorts Project -- Download & Installation のダウンロードと XCode の Command Line Tools のダウンロードが必要。Command Line Tools のダウンロードは こちら から。

参考

で、textmate を落としてきたところで、GitHub の textmate の README を見ると、

To build the source the following must first be installed on your system:

ninja — build system similar to make
ragel — state machine compiler
boost — portable C++ source libraries
multimarkdown — marked-up plain text compiler
mercurial — distributed SCM system

ninja, ragel boost, multimarkdown, mercurial を最初にインストールしてねと書いてある。

$ sudo port install ninja ragel boost multimarkdown mercurial

そんなわけで必要なモジュールがそろったら、TextMate をビルドしてインストール。

cd textmate
git submodule update --init
./configure && ninja

ちなみに 10.7 Lion の場合は、追加で必要なモジュールがあるのでインストールしておく。

sudo port install proctools

インストールが正常に終われば TextMate のウインドウが自動で立ち上がってくる。

あと、ビルド後のファイルが ~/build に残っているので、これを他のアプリケーションと同様、/Application フォルダに移動しておく。

cp -r ~/build/TextMate/Applications/TextMate/TextMate.app /Applications/