IntelliJ IDEA Cheat Sheet

Shortcuts

Double Shift

Search Everywhere

Find anything related to IntelliJ IDEA or your project and open it, execute it, or jump to it.

Ctrl+E

View recent files, Recent files popup

Select a recently opened file from the list.

Alt + 1

Project window

Esc

focus on editor

Alt + Enter

Show intention actions and quick-fixes

Alt+F1

locate the current file in the project structure

F2

Next highlighted error

Ctrl + B

go to declaration

Alt + F7

find usages

Tap Ctrl Twice

Run anything

Ctrl + W / Shift + Ctrl + W

Extend / Shrink Selection

Shift + Ctrl + Enter

Complete current statement

Shift + Ctrl + Alt + T

Refactor

Shift + Ctrl + A

Find Action

Ctrl+Shift+F

Find the search string in a project, Find in path

Add, Delete, and Move Lines

Ctrl+Y

To delete the current line

Ctrl + Mouse Wheel

zoom text content

Reformat and rearrange code

Ctrl+Alt+L

Reformat a code fragment in a file

Generating code

Alt+Insert

Generate getters and setters for a class

find and locate

Ctrl + Shift + M

Ctrl + [, Ctrl + ] also worked

move Caret to matching brace, Move Caret to Code Block Start/End

Alt+Enter

Auto import suggestion

Ctrl + G

Go to Line

Ctrl + Shift + Up / Down

Move Lines

Ctrl + Shift + F10

Run

preference

Change the UI theme

Settings/Preferences | Appearance & Behavior | Appearance

Theme list

  • Darcula: Default dark theme
  • Light: More traditional light theme
  • High contrast: Theme designed for users with color vision deficiency

Export/import project structure

  • *.iml (module description files)
  • .idea folder

Module dependencies

dependency scope

  • Compile: required to build, test, and run a project (the default scope).
  • Test: required to compile and run unit tests.
  • Runtime: included in the classpath for your sources and test sources but only at the run phase.
  • Provided: used for building and testing a project.

clear the caches in Intellij IDEA

file menu, Clear Caches and Restart, select option to restart

Debugger

Step over F8

Step into F7

Resume program F9

Run to cursor Alt + F9

Drop Frame

others

Console output encoding

On the Help menu, click Edit Custom VM Options.

1
2
-Dfile.encoding=UTF-8
-Dconsole.encoding=UTF-8

HTTP client

cookies

http-client.cookies file under the .idea/httpRequests/ directory