Mastering IntelliJ IDEA Keyboard Shortcuts in Linux and Windows


Find action

Quick Lists

  • Ctrl+Alt+Shift+T for “Refactor This”
  • Alt+` for VCS Operations.
  • Create a quick list “Refactor -> Extract”, add all commands and assign “Ctrl+alt+shit+e” to it.

Disable Linux Default Shortcuts

Disable the following Linux default shortcuts in System Preferences -> Keyboard -> Shortcut tab:

  • Disable Ctrl+Alt+S for “Toggle shaded state” at Widnows as it conflicts with Settings.
  • Disable Ctrl+alt+left/right for “Switch to left/right workspace” as it conflicts with IntelliJ Navigate -> backward/forward.
  • Disable Ctrl+Alt+T for Launch Terminal at Launchers as it conflicts with “Surround with”
  • Disable Alt+F7 for Move Window at Windows -> Positioning as it conflicts with Find Usages
  • Disable Alt+F8 for Resize Window at Windows -> Positioning as it conflicts with Evaluate Expression.

Customize Shortcuts

Some shortcuts in IntelliJ are difficult to remember and use, change them at Settings -> Keymap:

  • Change Alt+enter for Show intention actions to “Ctrl+1”:
    • “Ctrl+1” is much easier to use: just one (left) hand, have to use two hands for Alt+enter or use Alt+enter on the right side of keyboard.
  • Change reformat code from “Ctrl+alt+l” to “Ctrl+alt+shift+f”, as the previous conflicts with Linux Logout shortcut.
  • Assign “Editor” -> “Close tab” from “Ctrl+F4” to “Ctrl+w” and unassign it for “extend slection”
  • Assign “Alt-Shit-+(-)” to increase/decrease font size.

Common shortcuts

Double ShiftSearch Everywhere
Double ctrlRun Anything
Open settingsCtrl+Alt+S
Alt+1Toggle Project View
Alt+7Toggle structure View
Alt+2Toggle Favorite View
Alt+6Toggle TODO View
Alt+9Toggle Version Control View
Ctrl+shift+left/right/up/downStretch active window to ..
  • Alt+1 to focus on project view, then use Ctrl+shift+left(right) to move the separator.

Shortcuts for Navigation

  • to find directory: ctrl+shif+n for find file: then type “/the_directory_name”
Ctrl+eRecent files, press ctrl+e again to show changed files only
Ctrl+shift+eRecent locations, press again to show changed locations only
Ctrl+nFind class
Ctrl+Shift+NFind File
Ctrl+Shift+FFind in path
Ctrl+alt+shift+nFind Symbol
Ctrl+B, Ctrl+ClickStep Into/Show Usages
Alf+F7Find Usages
Ctrl+HHierarchy
Ctrl+F12File Structure: Outline
Ctrl(+shift)+wExtend or shrink selection
Ctrl+shift+backspaceNavigate -> Previous edit location
Ctrl+Shift+VPaste from five previous copies
Ctrl+F4Close editor
Ctrl+alt+left/rightNavigate -> backward/forward
F2/Shift+F2Go to next/previous error
Ctrl+GGo to line
Ctrl+Shift+TNavigating between test and test subject or create a test
Shortcuts for Java Source
  • Change reformat code from “Ctrl+alt+l” to “Ctrl+alt+shift+f”, as the previous conflicts with Linux Logout shortcut.
  • Documentation comment block: /** + Enter
Ctrl+F12File structure (outline)
Ctrl+Alt+oOrganize import(remove unused and reorder)
Ctrl+b (or Ctrl+click)Go to declaration
Ctrl+alt+bGo to implementation
Alt+insertGenerate
Ctrl+spacebasic auto-completion
Ctrl+shift+spaceSmart Type Completion
Alt+enterShow intention actions
Ctrl+Alt+Shift+InsertCreate Scratch file
Ctrl+Shift+TCreate/Navigate to test
Ctrl+shift+enterComplete current statement
Ctrl(+Shift)+lAdd/remove line or block comment
Ctrl+y (y for yes)delete line
Ctrl+pParameter info
Ctrl+Shift+VPaste from five previous copies
Alt+alt+tSurround with …
Ctrl+Alt+jSurround with template
Ctrl+Shift+UToggling Case

Shortcuts for Refactoring

Ctrl+Alt+(v/c/f/m/p)Extract variable/constant/field/method/parameter
F6Move Class (make inner from anonymous, move inner to outer)
Shift+F6Rename
F5Copy file

Shortcuts for Debugging

F8Step over
F7Step into
Shift + F7Smart step into
Shift + F8Step out
Alt + F9Run to cursor
Alt + F8Evaluate expression
F9Resume program
Ctrl + F8Toggle breakpoint
Ctrl + Shift + F8View breakpoints
Mouse Action
  • See type info: Ctrl and hover mouse over variable/method
  • Go to definition: Ctrl and click on variable/method

Presentation Mode

  • Alt+V > Enter Presentation Mode or use double shift or ctrl+shift+a then type “Presentation”.
  • To exit presentation mode: Alt+V > Exit Presentation Mode.

More tips about shortcuts

  • Press again for more results
  • type and search in a tree/list/table

Labels

adsense (5) Algorithm (69) Algorithm Series (35) Android (7) ANT (6) bat (8) Big Data (7) Blogger (14) Bugs (6) Cache (5) Chrome (19) Code Example (29) Code Quality (7) Coding Skills (5) Database (7) Debug (16) Design (5) Dev Tips (63) Eclipse (32) Git (5) Google (33) Guava (7) How to (9) Http Client (8) IDE (7) Interview (88) J2EE (13) J2SE (49) Java (186) JavaScript (27) JSON (7) Learning code (9) Lesson Learned (6) Linux (26) Lucene-Solr (112) Mac (10) Maven (8) Network (9) Nutch2 (18) Performance (9) PowerShell (11) Problem Solving (11) Programmer Skills (6) regex (5) Scala (6) Security (9) Soft Skills (38) Spring (22) System Design (11) Testing (7) Text Mining (14) Tips (17) Tools (24) Troubleshooting (29) UIMA (9) Web Development (19) Windows (21) xml (5)