Intellij Tricks https://www.udemy.com/intellij-idea-secrets-double-your-coding-speed-in-2-hours/learn/v4/t/lecture/4599722?start=0
- move line down:
command + shift + down
- move statement up:
command + shift + up
- duplicate current line:
command + d
- delete current line:
command + x
- view suggested parameters of a method:
command + p
- comment or uncomment current selection:
command + /
- block comment or uncomment current selection:
command + shift + /
- fold current code block:
command + '-'
- expand current code block:
command + '+'
- scroll page up
fn + up
- scroll page down
fn + down
- move to the first line of the code
fn + cmd + left
- move to the last line of the code
fn + cmd + right
- partial match
- camel humps
- wildcard search
- navigate to file:
command + shift + o
- type file name or file path to look up files
- type folder name with '/' in the end to look for folders
- navigate to the desired action:
command + shift + a
- to move between sections in search everywhere window
tab
- navigate to recent files:
command + e
- navigate to recent edited files:
shift + command + e
-
extend selection:
alt + up/down
-
select one word at a time
shift + alt + left/right
-
select the beginning to end
shift + command + left/right
-
select the next occurrence:
ctrl + g
-
unselect the next occurrence:
shift + ctrl + g
- after the new keyword in an object declaration
- in the list of parameters of a method call
- in return statements
- display postfix completion suggestion list:
command + j
- check expression to be null:
null
- check expression not to be null:
nn/notnull
- insert try-catch block:
try
- display generate menu in class file:
command + n
- display generate menu in test class:
command + n
- reformat current selection or current file:
alt + command + l
- optimize import statements:
alt + ctl + o
- enable Optimize imports on the fly to automatically optimize imports after each change
- build the application:
command + F9
- navigate to next compilation error:
alt + command + down
- navigate to previous compilation error:
alt + command + up
esc
to move the cursor to editor
- add language injection:
alt + enter
- close current fragment editor or current file:
command + W
- open the git manual
ctl + v
- commit project
command + k
- revert a file
alt + command + z
- show diff
command + D