Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
68 lines (52 sloc) 2.9 KB

IntelliJ Tips and Tricks

as of IntelliJ 14.0.3

Table of Contents

IntelliJ Shortcuts

replace Ctl with Cmd for OSX 🍎

  • Ctl + Plus/Minus -- expand/collapse code folding
  • Ctl + Backspace -- delete current line
  • Ctl + W -- smart select. Continue to type W to expand the selection.
  • Alt + F1 + Enter -- jump to the file in the 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

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)

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
You can’t perform that action at this time.