Home » Java » Core Java » Keyboard shortcuts in IntelliJ

About Shaun Abram

Shaun Abram

Keyboard shortcuts in IntelliJ

I attended a talk by Hadi Hariri at JavaOne last week. He introduced a whole bunch of IntelliJ keyboard shortcuts I was not aware of. Very useful talk. I have listed some of the most useful ones below.

  • Cmd-1: Move focus to the Project window

While there, type any class name (including using Camel Case e.g. HW to find HelloWorld), then git enter to have it open in the editor. F4 or Escape brings you to the editor.


  • Fn-Alt-Left arrow (Alt + ↖); Alt + Home also seems to work): Jump to Navigation Bar.
    • The Navigation Bar is a quick alternative to the Project view, for navigating to and opening files for editing. Since I do not have a function key on my Kinesis Advantage keyboard, I reprogrammed this to be Cmd ‘ (Command and quote)
    • Note that my preference is to hide the Navigation bar (View -> Navigation bar), and just call it on demand via Alt + Home (Alt + ↖ for Mac) shortcut.
    • Ctrl-N (or Alt-Insert) can then be used to create a new class.
  • Cmd-E: Show recent files
  • Cmd-Shift-E: Show recently edited files
  • Cmd-Shift-Backspace jump to the latest edit location
  • These are all very useful and even allow you to turn of the use of tabs completely (Preferences -> IDE Settings -> Editor -> Editor Tabs -> Placement -> None).

Editing shortcuts

  • Cmd-D: duplicate current line
  • Cmd-Y: delete current line
  • Ctrl+Shift+Up or Ctrl+Shift+Down: Move Statement Up/Move Statement Down. Note that if you place the caret at the method declaration, it will move the whole method for you.
  • See more at https://www.jetbrains.com/idea/webhelp/adding-deleting-and-moving-lines.html
  • Ctrl-W: select ever expanding blocks of text
  • Alt-Backspace, Alt-Delete: delete to word start/end
  • Cmd-, Preferences
  • Cmd-` Switch between projects
  • Shift-Cmd-A Show shortcuts; this is a useful way to navigate to any IntelliJ command
Reference: Keyboard shortcuts in IntelliJ from our JCG partner Shaun Abram at the Shaun Abram’s blog blog.
(0 rating, 0 votes)
You need to be a registered member to rate this.
Start the discussion Views Tweet it!
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
Notify of
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.

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

Inline Feedbacks
View all comments