mateコマンド [2]

Posted by yatsu Wed, 05 Oct 2005 16:44:46 GMT

TextMate revision 499からmateコマンドがTextMate.appに含まれるようになった(TextMate.app/Contents/Resources/mate)。

使用するには、PATHが通っているディレクトリにリンクを作っておく。

% cd ~/bin
% ln -s /Applications/TextMate.app/Contents/Resources/mate mate

また、ファイル名が _wait で終わる場合、デフォルトで mate --wait として実行されるようになった。

たとえば以下のようにmate_waitコマンドを作る。

% cd ~/bin
% ln -s /Applications/TextMate.app/Contents/Resources/mate mate_wait

引数なしの mate はファイルを開いてすぐに終了するが、mate --wait はファイルが閉じられるまでコマンドが終了しない。 mate_waitをEDITOR環境変数をセットしておくと便利だろう。

export EDITOR="mate_wait"

つまり、mate_waitコマンドはemacsclientコマンドのようなものだ。

それに対して、端末から手動でファイルを開く場合はmateの方がよい。

% mate ReleaseNotes.txt

Comments

Trackbacks

Use the following link to trackback from your own site:
http://yatsu_info/articles/trackback/20678

(leave url/email »)

   Comment Markup Help Preview comment