4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

intellij でコマンドラインからprojectを開く

Last updated at Posted at 2018-12-17

tr:dr

  • intellijでコマンドラインからprojectを開きたかった。

手順

  1. Menu→Tools→Create Command-Line Launcherをクリックする

    • 下のような画面が出る
      window.png
  2. Macの標準は /usr/local/bin/idea だが、好みでパスを変更する

  3. 2.で設定したパスを$PATHを通す。

  4. コマンドラインで idea で使えるようになる。あとはaliasやkeybindとかはよしなに

使い方

プロジェクト・ファイルを開く

idea  path

ファイルを行指定で開く

idea --line <number> path

別の書き方

idea path:<number>

diffを取る

idea diff path1 path2

複数ファイルをmergeする

idea merge path1 path2 path3 output

余談

  • command lineから開くのは前からやってたけど、intelliJのversionを上げたら何故かうまく動かなくなったので、↑の手順をもう一回やったら動くようになった。
  • RubyMineとかPhpStormとかでも同じような感じでいけると思う。

参考

4
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?