Cheatsheet IntelliJ IDEA
IDE da JetBrains para Java/Kotlin (base do Android Studio e Flutter)
IntelliJ IDEA
File and Project
New (generate)
Alt + Insert
Generates class, file, constructor, etc.
Project structure
Ctrl + Alt + Shift + S
Opens the project structure.
Save all
Ctrl + S
Saves all files.
Recent files
Ctrl + E
Lists the recent files.
Close tab
Ctrl + F4
Closes the active tab.
Recent locations
Ctrl + Shift + E
Lists recently edited locations.
Settings
Ctrl + Alt + S
Opens the IDE settings.
Edition
Undo / Redo
Ctrl + Z (undo)
Ctrl + Shift + Z (redo)
Reverts or reapplies actions.
Move line
Alt + Shift + ↑ / ↓
Moves the current line.
Cut / Copy / Paste
Ctrl + X (cut)
Ctrl + C (copy)
Ctrl + V (paste)
Clipboard.
Comment line
Ctrl + /
Comments or uncomments the line.
Duplicate line
Ctrl + D
Duplicates the current line.
Comment block
Ctrl + Shift + /
Comments the selected block.
Delete line
Ctrl + Y
Removes the current line.
Toggle case
Ctrl + Shift + U
Toggles uppercase/lowercase.
Navigation
Search everywhere
Shift + Shift (double)
Searches classes, files, symbols and actions.
Go to line
Ctrl + G
Jumps to a line number.
Type hierarchy
Ctrl + H
Shows the class hierarchy.
Go to class
Ctrl + N
Searches for a class by name.
Go to definition
Ctrl + B (or Ctrl + Click)
Jumps to the symbol declaration.
File structure
Ctrl + F12
Lists the members of the current file.
Go to file
Ctrl + Shift + N
Searches for a file by name.
Go to implementation
Ctrl + Alt + B
Jumps to the implementations.
Go to symbol
Ctrl + Alt + Shift + N
Searches for methods and variables.
Back / forward
Ctrl + Alt + ← (back)
Ctrl + Alt + → (forward)
Navigates the position history.
Search and Replace
Search
Ctrl + F
Searches in the current file.
Next / previous
F3 (next)
Shift + F3 (previous)
Navigates the results.
Replace
Ctrl + R
Replaces in the current file.
Actions (Find Action)
Ctrl + Shift + A
Searches for IDE commands and actions.
Search in project
Ctrl + Shift + F
Searches across the whole project.
Replace in project
Ctrl + Shift + R
Replaces across the whole project.
Code and Refactoring
Autocomplete
Ctrl + Space
Basic code suggestions.
Refactor this
Ctrl + Alt + Shift + T
Menu of available refactorings.
Quick documentation
Ctrl + Q
Shows the symbol documentation.
Smart autocomplete
Ctrl + Shift + Space
Suggestions by expected type.
Format code
Ctrl + Alt + L
Formats the file according to the style.
Fold / expand
Ctrl + - (fold)
Ctrl + + (expand)
Collapses or shows blocks.
Quick fix
Alt + Enter
Shows intentions and fixes.
Optimize imports
Ctrl + Alt + O
Removes unused imports.
Rename
Shift + F6
Renames the symbol across the whole project.
Override methods
Ctrl + O
Generates superclass methods.
Execution and Build
Run
Shift + F10
Runs the current configuration.
Build project
Ctrl + F9
Builds the project (Make).
Debug
Shift + F9
Starts in debug mode.
Stop
Ctrl + F2
Stops the running execution.
Run in context
Ctrl + Shift + F10
Runs the test/class under the cursor.
Choose configuration
Alt + Shift + F10
Chooses and runs a configuration.
Debugging
Toggle breakpoint
Ctrl + F8
Adds/removes a breakpoint on the line.
Step out
Shift + F8
Steps out of the current function.
Continue / resume
F9
Resumes until the next breakpoint.
Evaluate expression
Alt + F8
Evaluates an expression at runtime.
Step over
F8
Advances one line (without stepping in).
View breakpoints
Ctrl + Shift + F8
Lists all breakpoints.
Step into
F7
Steps into the called function.
VCS and Tools
Commit (Git)
Ctrl + K
Opens the commit window.
Project panel
Alt + 1
Shows/hides the project explorer.
Push (Git)
Ctrl + Shift + K
Pushes the commits to the remote.
Terminal
Alt + F12
Opens the integrated terminal.
Update project
Ctrl + T
Pulls/updates from the remote.
Hide panels
Shift + Esc
Hides the active tool window.
VCS operations
Alt + `
Version control pop-up menu.