LoginSignup
3
1

More than 3 years have passed since last update.

IntelliJ IDEA 備忘録

Last updated at Posted at 2018-04-09

ショートカット

Edit

  • Ctrl+Shift+ZでRedo

  • Ctrl+Shift+F: プロジェクト内のファイルを検索できる(Find in Path)

View

  • Ctrhl+Shift+S: Sbt Shell(Tool Window)

  • Ctrl+Shift+F12 : ツールウィンドウをすべて非表示にして、エディタウィンドウのみを表示する(Enter Distraction Free Mode. )

  • Enter Presentation Mode. コードを見せるときに便利。

Navigate

Code

  • Ctrl+Alt+Oで最適なインポート文に変更してくれる(Optimize Imports)

Quick pop-ups

  • Ctrl+Q : ScalaDocを閲覧(Documentation)

  • Ctrl+Shift+Q : Implicit conversions

  • Ctrl+Shift+P : Implicit parameters

  • Ctrl+Shift+I : Quick Defenition(メソッドの定義を確認)

Help

  • Ctrl+Shift+A : Find Action

その他

  • Shift+Escape : ツールウィンドウを非表示にする

  • Alt+Right, Alt+Left : タブ切り替え(Navigate between opened tabs)

  • メソッド引数部分でCtrl+P:パラメタ情報を表示

  • 矩形選択:Altを押しながら or マウスの中央ボタンを押しながら選択(UbuntuでAltを押しながらドラッグすると、ウィンドウが移動してしまう)

  • Project View

  • Auto Scroll to Source: 開いているファイルが、プロジェクトツリービューに表示される

Scala関係

https://www.jetbrains.com/help/idea/discover-intellij-idea-for-scala.html
https://www.jetbrains.com/help/idea/run-debug-and-test-scala.html

プロキシ環境でのIntelliJ IDEA with SBT

設定箇所が多いです。
プロキシ環境でのIntelliJ IDEA with SBT

libraryDependenciesが反映されない

build.sbtlibraryDependenciesを書いたけど、そのライブラリが使えない場合
⇒[Refresh Project]を実行
https://stackoverflow.com/questions/41372978/unknown-artifact-not-resolved-or-indexed-error-for-scalatest

sbt shellで日本語が文字化けしてしまう

idea.exe.vmoptions, idea64.exe.vmoptions設定ファイルに-Dfile.encoding=UTF-8を記述する。

https://syobochim.hatenablog.com/entry/2014/05/11/145757 参照

Gradle関係

プロジェクト生成時にsrc/mainフォルダが生成されない。

Gradleの設定で、"Create directories for empty content roots"チェックをONにすると、src/mainフォルダが自動的に生成されます。
image

その他

ツールチップのコピー

Alt+左クリックでできます。
https://teratail.com/questions/118916

Setting

改行コード(Line Separators)の設定

コードの折り畳み(Code Folding)の設定

[WIP] 保存していたGitのパスワードを変える

[WIP] 保存していたGitのパスワードを変える

typoのWarningを解除するため、単語を定義する

プラグイン

3
1
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
3
1