19 April 2019
IntellijIDEA Shortcuts
by Jerry Zhang
#Tip of the Day: 磨刀不误砍柴工 A beard well lathered is half shaved.
懂中文的童鞋建议直接去慕课网看视频 https://www.imooc.com/video/16217
Actions: Ctrl + Shift + A
Interface
Alt + 1: project
Alt + 2
…
Go to
Jump to previous/next word: Ctrl + left/right
Jump and select previous/next word: Ctrl + Shift + left/right
Jump by method: Alt + up/down
Jump by tab: Alt + left/right
Edit
delete line: Ctrl + Y
move line: Ctrl + Shift + up/down
copy line: move cursor to the line, Ctrl + c, Ctrl + v
Toggle between windows
Next Project Window: Ctrl + Alt + ]
Previous Project Window: Ctrl + Alt + [
Toggle between files
Recent file: Ctrl + E
Recent changed files: Ctrl + Shift + E
Open/Search class: Ctrl + N
Last Edit Location: Ctrl + Shift + Backspace
Next Edit Location: Ctrl + Alt + Backspace
Back/Forward: Alt + Shift + left/right
Bookmarks: (Ctrl + ) F11
Go to bookmark: trl + number
Add to favorites: Alt + Shift + F
Toggle between VMware and Windows
exit current virtual screen: Ctrl + Alt
toggle in windows: Alt + Tab
grab current screen in virtual machine: Ctrl + G
Search
Search class: Ctrl + N
if you press Ctrl + N twice, you can search include jar or dependency packages
Search file: Ctrl + Shift + N
field/method: Ctrl + Shift + Alt + N
String: Ctrl + Shift + F
Find next: Ctrl + L
Column Operation: Select all Occurrences: Ctrl + Alt + Shift + J
Format Code: Ctrl + Alt + L
Live template
public static final int: psfi …
Prints a value to System.out: soutv
Prints current class and method names to System.out: soutm
READ YOUR LIVE TEMPLATE!
Postfix
100.fori
“somestring”.sout
name.field
user.return
user.nn
Alt + Enter
Refactor
Rename: Shift + F6
Refactor method: Add parameter in the method directly, then Alt + Enter
Extract variable: Ctrl + Alt + V
Extract constant: Ctrl + Alt + c
Extract field: Ctrl + Alt + f
Extract parameter: Ctrl + Alt + p
Extract method: Ctrl + Alt + m
Git
annotate/display author: right click next to the line number. Or I set it as Alt + a
revert: Alt + Command + Z
local history: I set it as Alt + Shift + h
Debug
add breakpoint: Ctrl + F8
Debug: shift + F9, then F8,F8,F8…
Resume: F9
See all breakpoints: Shift + Ctrl + F8
Mute breakpoints:
condition:
Evaluate Expression: Alt + F8
Run to Cursor: Alt + F9
Set value: in debug variables: F2
Run: Shift + F10
Unit test: Ctrl + Shift + F9
Choose one to debug: Alt + Shift + F9
file operation:
new file: Alt + 1, then Alt + insert
copy current file: F5
move current file: F6
copy file path: Ctrl + Shift + c
choose content to paste: Ctrl + Shift + v