Software Development

My tips for using IntelliJ IDEA effectively

I wanted to share my tips and tricks that and especially keyboard shortcuts that make me more productive when using IntelliJ IDEA. IntelliJ is my favorite IDE and a very well thought-out program in general, and despite trying to learn the countless shortcuts available, there are a few that give you the biggest productivity boost already.

My frequently used features and shortcuts that I showed in the video are:

Coding

  • IdeaVIM
  • Live templates (e.g. mainpublic static void main( …​)
  • Postfix completion (e.g. "Hello".soutSystem.out.println("Hello");)
  • Ctrl+Space:  Basic code completion
  • Ctrl+Shift+Enter:  Complete current statement
  • Alt+Enter:  Show context actions (aka “quick fix”)
  • Ctrl+Alt+L:  Reformat code (and optimize imports when activated)
  • Ctrl+B:  Go to declaration / usage
  • Ctrl+Shift+B:  Go to implementation(s)
  • Ctrl+U:  Go to super method
  • Alt+Insert:  Generate code
  • F2:  Next highlighted error
  • Ctrl+Alt+V/F/C/P:  Extract variable / field / constant / parameter
  • Ctrl+Alt+N:  Inline
  • Ctrl+F12:  File structure (e.g. list of methods)

Navigating

  • Ctrl+N:  Go to class
  • Ctrl+Shift+N:  Go to file
  • Shift+Shift:  Find all
  • Alt+1:  Project view
  • Alt+F1+Enter:  Jump to file in project view
  • Ctrl+Shift+F:  Find in files
  • Alt+Left/Right:  Switch open files
  • NerdTree in IdeaVIM

Running

  • Ctrl+Shift+F10:  Run current context
  • Shift+F10:  Run
  • Shift+F9:  Debug
  • F7/F8/F9:  (debug mode) Step into / Step over / Resume program

Published on Java Code Geeks with permission by Sebastian Daschner, partner at our JCG program. See the original article here: My tips for using IntelliJ IDEA effectively (Video)

Opinions expressed by Java Code Geeks contributors are their own.

Do you want to know how to develop your skillset to become a Java Rockstar?
Subscribe to our newsletter to start Rocking right now!
To get you started we give you our best selling eBooks for FREE!
1. JPA Mini Book
2. JVM Troubleshooting Guide
3. JUnit Tutorial for Unit Testing
4. Java Annotations Tutorial
5. Java Interview Questions
6. Spring Interview Questions
7. Android UI Design
and many more ....
I agree to the Terms and Privacy Policy

Sebastian Daschner

Sebastian Daschner is a self-employed Java consultant and trainer. He is the author of the book 'Architecting Modern Java EE Applications'. Sebastian is a Java Champion, Oracle Developer Champion and JavaOne Rockstar.
Subscribe
Notify of
guest


This site uses Akismet to reduce spam. Learn how your comment data is processed.

1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Rob Lewis
3 years ago

Thanks, but how do these map to Mac keystrokes?

Back to top button