Cheatography
https://cheatography.com
Tool Windows / Popups
Project |
⌘1 |
Version Control |
⌘9 |
Run |
⌘4 |
Debug |
⌘5 |
Terminal |
⌥F12 |
Editor |
Esc |
Navigation Bar |
⌘↑ |
Hide all tool windows |
⇧⌘F12 |
Accessing a tool window via its shortcut moves the input focus to it, so you can use all keyboard commands in its context. When you need to go back to the editor, press ⎋ (Esc).
Code Completion
Basic completion |
⌃Space |
Smart Completion |
⌃⇧Space |
See suggested parameters for method/function |
⌘P |
Quick Popups
Documentation |
F1 |
Quick definition |
⌥Space |
Show usages |
⌥⌘F7 |
Show implementation |
⌥⌘B |
Refactoring
Rename |
⇧F6 |
Extract variable |
⌥⌘V |
Extract constant |
⌥⌘C |
Extract function |
⌥⌘M |
Inline |
⌥⌘N |
Copy |
F5 |
Move |
F6 |
Refactor this |
⌃T |
Code Style and Formatting
Reformat code |
⌥⌘L |
Auto-indent lines |
⌃⌥I |
Optimize imports |
⌃⌥O |
Go fmt file |
⌥⇧⌘F |
Go fmt project |
⌥⇧⌘P |
|
|
Editor Basics
Move the current line of code |
⇧⌘↑ ⇧⌘↓ |
Duplicate a line of code |
⌘D |
Remove a line of code |
⌘⌫ |
Comment or uncomment a line of code |
⌘/ |
Comment a block of code |
⌥⌘/ |
Find in the currently opened file |
⌘F |
Find and replace in the current file |
⌘R |
Next/previous occurrence |
⌘G ⇧⌘G |
Navigate between opened tabs |
⇧⌘] ⇧⌘[ |
Navigate back/forward |
⌘[ ⌘] |
Expand or collapse a code block in the editor |
⌘+ ⌘- |
Create new... |
⌘N |
Surround with |
⌥⌘T |
Highlight usages of a symbol |
⌘F7 |
Expand/shrink a selection based on grammar |
⌥↑ ⌥↓ |
Select/deselect any piece of code (multiple selections allowed) |
⌃G |
Debug
Toggle breakpoint |
⌘F8 |
Disable breakpoint |
Click on the gutter while holding Alt |
Change breakpoint details |
⇧⌘F8 |
Step into (debug mode) |
F7 |
Step over (debug mode) |
F8 |
Step out (debug mode) |
⇧F8 |
Resume (debug mode) |
⌥⌘R |
Evaluate expression tool (debug mode) |
⌥F8 |
|
|
Inspections
Go to next/previous problem |
F2 ⇧F2 |
Choose Quick Fix |
⌥⏎ |
Inspections are built-in static code analysis tools that help you find probable bugs, detect performance issues, and improve the overall code structure.
Navigation
File Structure Popup |
⌘F12 |
Recent Files Popup |
⌘E |
Select In Popup |
⌥F1 |
Navigate to Type |
⌘O |
Navigate to File |
⇧⌘O |
Navigate to Symbol |
⌥⌘O |
Navigate to type declaration |
⇧⌘B |
Navigate to declaration |
⌘B |
Navigate to type hierarchy |
⌃H |
Navigate to implementation(s) |
⌥⌘B |
Navigate to super method |
⌘U |
Navigate to test |
⇧⌘T |
Search everywhere |
Double Shift |
Build and Run
Once you've created a Run/Debug configuration by selecting Run | Edit Configurations from the main menu, you are able to run and debug your code.
Finding Usages
Find Usages |
⌥F7 |
Set custom options for the Find Usages algorithm |
⌥⇧⌘F7 |
Find in Path (if looking for plain text) |
⌘F |
Find Usages helps you quickly find all pieces of code referencing the symbol at the caret (cursor).
Version Control
VCS Operations Popup |
⌃V |
Version Control Tool Window |
⌘9 |
Commit changes |
⌘K |
Update project |
⌘T |
Push commits |
⇧⌘K |
|
Created By
Metadata
Comments
zhangyunhe, 05:56 22 Feb 19
great
Add a Comment