IntelliJ idea shortcut collation (Mac version)



CMD + D: copy the current code to the next line
CMD + e: open recently accessed files; CMD + Shift + e: recently edited files
CMD + J: select code template
**CMD + N: generate code (constructor, getter, setter, toString…), equal to Ctrl + enter
CMD + O: open class
CMD + Shift + O: open file**
CMD + F12: display class members (equivalent to CMD + O in eclipse)
CMD + /: add and remove comments//, CMD + opt + /: add and delete comments/**/
CMD + backspace: delete line


Shift + F6: Rename
Shift + ESC: move the focus to the edit window and hide the tool window. F12 moves the focus from the edit window back to the last tool window
Shift * 2 times: search for files


CTRL + O: override a method of the parent class to generate an override method
CTRL + H: displays the subclasses of the current class
CTRL + Enter: equal to CMD + n


OPT+ ⬆️ : select the block code (click repeatedly to select a larger block)

Compound bond

CTRL + Shift + space: intelligent completion
CTRL + Shift + R: execute the main method

CMD + Shift + backspace: return to the last edit position, reuse to return to the last position
CMD + Shift + F7: highlight the selected variable, then press CMD + G to traverse all references, and CMD + Shift + G to traverse in reverse
CMD + Shift + V: select the content to paste from the clipboard
CMD + Shift + Enter: complete syntax structure code automatically

CMD + opt + T: surround with… Can generate if, if else, while, do while, for, try catch, etc
CMD + opt + B: view the implementation class of the current class
CMD + opt + O: find method

Opt + Shift + C: View recent engineering modification records

Other keys

F2 / shift + F2: jump in highlighted syntax error
F5: copy class

Shortcut function

PSVM: generate main code block
South: generating System.out.println (); code block
SERR: generating System.err.println (); code block
ITER: generate foreach code block