Throw away your mouse and use the shortcut every day.
⌘ = Command Key
⌥ = Option Key
⇧ = Shift Key
⌃ = Control Key
* = introduced in the session
Shortcut | Description |
---|---|
⌘1 | Project * |
⌘4 | Run |
⌘5 | Debug |
⌘6 | Logcat |
⌘7 | Structure |
⌘9 | Version Control |
⌥F12 | Terminal * |
⇧Esc | Hide last active tool window * |
⌘W | Close |
esc | Return to editor window |
⌘⇧F12 | Maximize/minimize editor * |
⌘⇧←/→ or ⌘⇧↑/↓ | stretch tool window |
Shortcut | Description |
---|---|
⌘, | Preferences |
⌘⇧A | Search Action * |
Shortcut | Description |
---|---|
Double⇧ | Search Everywhere * |
⌘O | Find class |
⌘⌘⇧O | Find file * |
⌘⌥O | Search by symbol name |
⌘⇧F | Find in path Editable |
⌘E | Recent files list * |
⌘⇧E | Recently changed files list |
⌃Tab | Return to previously opened file * |
⌥F1 & Project View | Scroll From Source |
⌃⇧→ | cycle through xml file's tabs * |
⌘↑ | Jump to Navigation Bar |
⌘W | Close |
⌘⇧[/] | cycle through tabs |
⌘[/] or ⌘⌥←/→ | Back / Forward * |
Shortcut | Description |
---|---|
⌘B | Declaration * |
⌘⌥B | Implementation * |
⌘⌥F7 | Highlight Usages * |
⌃⌥H | Call hierarchy * |
⌘U | Super Method * |
⌘F12 | File Structure * |
⌘↑Delete | Return to the last edited location * |
⌘L | line |
⌘⌥[/] | Code block start/end |
F2 | Navigate to Error or Warning * |
⌘⌥F12 | Reveal in Finder * |
F1 | Quick Document |
⌘P | Parameter Info * |
⌥space | Quick Definition * |
⌘F1 | Error description * |
⌥F3 | register Bookmark |
⌃{Bookmark} | Go to Bookmark |
⌘F3 | Bookmarks list |
Shortcut | Description |
---|---|
⌘J | Live Template |
⇧⏎ | Start new line * |
⌘⏎ | Split line |
⌃Space | code completion * |
⌘⇧⏎ | Complete statement |
⌥↑/↓ | Expand/Shrink selection * |
⌘delete | Delete line * |
⌘⌥T | Wrap a block in try-catch, If, parenthesis * |
⌘/ | Line comment |
⌘⇧/ | Block comment |
⌃O | Override * |
⌘C | Copy line |
⌘D | Duplicate * |
Double⌥ & ↑/↓ | Clone caret |
⌃G | select occurrence * |
⇧⌃G | unselect occurrence |
⌘⌃G | select all occurrence |
⌘⇧U | toggle upper/lower case * |
⌥⌘L | Reformat * |
⌥⌃O | Optimize Imports * |
⌘. | Collapse/expand current code block |
postfix | Description |
---|---|
var | val name = expression |
val | var name = expression |
listOf | listOf(expr) |
arrayOf | arrayOf(expr) |
for or iter | for (item in expr) |
sout | println(expr) |
null | if (expr == null) |
not | !expr |
notnull or nn | if (expr != null) |
if | if (expr) |
else | if (!expr) |
while | while (expr) {} |
when | when (expr) |
par | (expr) |
try | try { co e } catch (e: Exception) { } |
return | return expr |
Shortcut | Description |
---|---|
⌥⌘V | Variable |
⌥⌘F | Property |
⌥⌘P | Parameter |
⇧⌥⌘P | Functional Parameter |
⌥⌘M | Function * |
⇧⌥⌘M | Function to scope |
⌥⌘N | inline |
⌃T | Refactor Menu * |
F6 | Move class * |
⇧F6 | Rename * |
⌘F6 | Change signature * |
⇧⌥↑/↓ | Move line * |
⇧⌘↑/↓ | Move statement * |
F5 | Copy class |
⌥⏎
Description |
---|
Extract string resource |
Convert to Lambda |
Typo Rename to... |
Make 'xxx' private |
Safe delete 'xxx' |
Replace 'if' is 'when' |
Add remaining branches |
Change return type of enclosing function |
Inline variable |
Convert to expression body |
Put parameters on separate lines |
Put parameters on one line |
Flip ',' |
Inject language or reference |
Shortcut | Description |
---|---|
⌃R | Run * |
⇧⌃R | Run cursor target * |
⌃D | Debug * |
⇧⌃D | Debug cursor target |
⌘F8 | Toggle line breakpoint * |
⇧⌘F8 | Breakpoint list |
F8 | Step over * |
F7 | Step in * |
⇧F8 | Step out * |
⌥⌘R | Jump to the next breakpoint * |
⌥F9 | Stop at your current cursor position * |
⌥F8 | Show the evaluate dialog * |
⌃⌥R | Show executed list * |
⇧⌘T | Jump to the associated test file * |
Shortcut | Description |
---|---|
⌘K | commit |
⇧⌘K | push |
⌃V | VCS menu |