LoginSignup
6
6

More than 5 years have passed since last update.

IntelliJ IDEA Tips

Last updated at Posted at 2014-10-09

Mac環境です。キーバインド変えているので一部違うかもしれないです。

一般

  • ウィンドウを分割した時に隣のウィンドウへ移動するときには Option + Tabで移動できる
  • Shift + command + e で最近修正したファイル一覧を見れる
  • command + - でimport文の部分などを閉じる. command + ^で開ける。日本語キーボードなのでKeymapに書いてあるものと実際は若干違うので注意
  • complete current statementは if (i % 3 != 0 && i % 5 != 0) の最後の0のところで shift + command + enterを押すと以下のようになる
if (i % 3 != 0 && i % 5 != 0) {

}
  • 以前使った検索条件でもう一度検索したいときは、3:Findのパネルにフォーカスを合わせて command + eで検索できる

Git

  • 複数のモジュールを扱うときは同じブランチ名にしておくと、Common Local Branchで一度に切り替えることができる。PreferencesのVersion Controlに複数Gitのモジュールを登録するか、ProjectのVCSをGitにしたあと、Control〜にチェックを入れておく
    img.png

  • GitでMergeするときは、VCS -> Git -> MergeにしてNo commitをチェック入れたほうが便利

  • Perferences + GitHubでGHEのサーバを設定すると、そこからPull Requestが遅れる(もちろんそのままだとGitHubへ遅れる)

Database

  • select * from bar where id = ? とするとバインド変数を設定できる。
  • option + command + e で履歴を選べる。

その他

  • can not resolve symbol が表示されたら,[File]-->[Invalidate cache]をする
  • Auto ImportするにはPreferencesのAdd unambiguous import on the flyにチェックを入れる
  • Task Serverを設定してからcommitするときに、ctrl - spaceすると、メッセージを保管してくれる
  • Preferences -> Build Tools > Maven > Repositoriesの updatedがエラーになる場合は、~/Library/Caches/IntelliJIdea<バージョン>/Mavenがあるので一度消してみる
  • GoLangのgomを使うときには、Preferences -> Go > Go Libiraries のProject Libirariesに<プロジェクトルート>/_vendorを設定すると、ライブラリなどを見に行く。(Goプラグイン0.9.402で確認)
6
6
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
6
6