Curated list of intelliJ shortcuts for Engineers
There are not many cheat sheets for mac key-map out there. So I gathered the following shortcuts from blog-posts, comment-sections, videos and personal experience with the intelliJ editor. Efficiency is intelligent laziness. Kept the article simple for Screen readers.
Navigation Category:
move cursor one word at a time — Option + (Left arrow, Right Arrow)
move cursor to end or beginning of line — Command + (Left, right)
navigate through file — Fn + (up, down)
go to the end of the file — Fn + Command + Down
go to the beginning of the file — Fn + Command + Up
Code Navigation Category:
Search class — Command + O
Go back in class — Command + [
Navigate to symbol — Alt + Command + O
navigating file — Command + Shift + O
navigating folder — Command + Shift + O (and type / at the end of the folder name)
navigating actions (like increasing font size) — Command + Shift + A
search everywhere — shift + shift
recently opened files — Command + E
recently edited files — Command + Shift + E
Editing Category:
ClassName — by typing Cap letter you can get the suggestion ClassName
move lines without cut and paste — Shift + Alt + (Down,Up)
move methods around (works for loop statements aswell) — go to the method signature line -> Shift + Command + (Up,Down)
duplicate a line — Command + D
delete a line — Command + delete
see parameter info — Command + P
comment and uncomment code — Command + /
comment and uncomment block of code as whole (block comment) — Command + Alt + /
folding code — move anywhere in function u wanna collapse -> Command + (minus -)
unfolding code — Command + (plus +)
Code Selection Category:
Selecting one word at a time — Shift + Alt + (left,right)
Selecting entire line — Shift + Command + (left,right)
Selecting entire Strain — Alt + Up Arrow
To extend selection — Just keep pressing Alt and up arrow
to shrink selection — Alt + down arrow
Code completion Category:
Generate getters n setters etc — Command + N
Smart code completion — Shift + Command +Spacebar
Static method completion displays static method suggestion list — Cntrl + Space (2X)
add static import — Alt + Enter
Postfix completion — Command + J
Version Control Category:
Commit changes dialogue — Command + K (out of focus — Shift + Tab)
see diff view — Command + d
Revert changes — Alt + Command + Z
Formatting Category:
to move right — Tab
to move left — Shift + Tab
formatting the file — Alt + Command + L
formating all files in directory — Select the directory — Alt + Command + L
Opitmizing imports — Control + Alt + O
Navigate compilation error — Alt + Command + (down,Up)
The End.
Thanks, will try to add github link which has readme edition and better formatting.