ただ崇高なシンボリックリンクを作成しました。
$ sudo ln -s /opt/SublimeText2/sublime_text /usr/bin/subl
問題は、最後のプロジェクトと私が開こうとしているプロジェクトが開かれることです。
$ subl my-project
または
$ ~/my-project/subl .
どちらのコマンドも Sublime Text 2 を 2 回開くので、2 つの ST2 が実行されます。
この問題をどのように解決しますか?
ベストアンサー1
$ ./sublime_text --help
Sublime Text 2 Build 2217
Usage: sublime_text [arguments] [files] edit the given files
or: sublime_text [arguments] [directories] open the given directories
Arguments:
--project <project>: Load the given project
--command <command>: Run the given command
-n or --new-window: Open a new window
-a or --add: Add folders to the current window
-w or --wait: Wait for the files to be closed before returning
-b or --background: Don't activate the application
-h or --help: Show help (this message) and exit
-v or --version: Show version and exit
新しいウィンドウを開くのではなく、フォルダツリーを実行しているアプリケーションインスタンスに送信する「-a」オプションを指定して、目的の効果を得ることができます。