Skip to content

Latest commit

 

History

History
76 lines (55 loc) · 3.01 KB

File metadata and controls

76 lines (55 loc) · 3.01 KB

IntelliJ Tips and Tricks

as of IntelliJ 14.0.3

🚧 under review for 2022.1.3

Table of Contents

IntelliJ Shortcuts

🤌 replace Ctl with ⌘ (Cmd) for MacOS

  • Ctl + Plus/Minus -- expand/collapse code folding
  • Ctl + Backspace -- delete current line
  • Ctl + W -- smart select. Continue to type W to expand the selection. ⌥ + Up/Down for MacOs
  • ⌘ + 1 -- go to Project View
  • Ctl + Alt + Left/Right -- go back or forward to last point (useful if traversing a call stack)
  • Ctl + P -- show method parameters
  • Ctl + B -- go to declaration (for any element in a class)
  • Ctl + Alt + H -- show call hierarchy
  • Ctl + N -- go to a class file in the project ⭐
  • Ctl + Shift + N -- go to any file in the project ⭐
  • Ctl + E -- show recent files
  • Ctl + Shift + K -- git push
  • Ctl + Ctl -- run anything

Thanks to Trisha Gee for these shortcuts below

  • Ctl + Shift + A -- navigate directly to an action/option (e.g., collapse/expand)
  • Ctl + Shift + Enter -- statement completion
  • Ctl + Shift + S -- open settings menu
  • Ctl + Shift + Alt + S -- open project structure menu
  • ! -- negating completion
  • Ctl + F12 -- navigate w/i a class

Refactoring

  • Ctl + Alt + M -- extract selected code into a new method
  • Ctl + O -- generate override method(s)

Selection Menu

  • Option + F1 and then 1 for Project view

Project Tricks

  • To open a Gradle project for the first time: "Open" -> Navigate to build.gradle file
  • turn off IntelliJ tabs
  • Ctl + Shift + [0-9] -- set a numbered bookmark
  • Ctl + [0-9] -- jump to numbered bookmark

Debugging

myList.size() % 10 == 0
  • Ctl + F8 -- toggle breakpoint
  • Shift + F9 -- Run Debug

References

  1. http://trishagee.github.io/
  2. https://www.jetbrains.com/idea/docs/IntelliJIDEA_ReferenceCard.pdf
  3. http://www.radcortez.com/my-most-useful-intellij-idea-keyboard-shortcuts/
  4. https://medium.com/@andrey_cheptsov/top-20-navigation-features-in-intellij-idea-ed8c17075880?source=most-recommended