Here are the shortcuts I use in my daily Java routine:
-
sout: System.out.println
-
souf: System.out.printf
-
fori: for loop
-
itar: for loop
-
iter: foreach loop
-
ALT+ENTER: Gives suggestions
-
ALT+INSERT: What kind of construction to implement with the code
-
CTRL+F5: Refreshes the console
-
CTRL+Q: Shows documentation offline
-
SHIFT+F1: Shows documentation online
-
CTRL+D: Copying the previous row on the current one (the cursor must be on the previous one)
-
CTRL+Y: Put the cursor on the row + CTRL+Y and it will delete it (the row)
-
CTRL+SHIFT+ARROW UP/ARROW DOWN: Moves the current row (on which is the cursor) to the upper or the row down below - inter-changing them with each other
-
CTRL+ALT+T: - Surround the code + CTRL+ALT+T - it will show you which options you can use/implement (IF, TRY-CATCH BLOCK, ETC.) - Surround the code with... (Live templates)
-
CTRL+ALT+L: Formatting the code - making it beautiful :-)
-
F2: Shows where is the error in the code - the cursor will go directly on the error
-
RIGHT CLICK >> Local History >> Show History: Shows the last changes (history - and you can choose which version to use)
-
CTRL+P: Put the cursor between the brackets (|) + CTRL+P: it will show you which parameters (values) you can use/put inside of the brackets ()
-
SHIFT+F6: Renames all variables at once (FIRST HAVE TO CHOOSE the variable you want to change/rename + SHIFT+F6)
-
Double-press Shift: Searches everywhere
-
CTRL+J: Inserts a live template
-
CTRL+ALT+J: Surrounds with a live template
-
CTRL+R: Find and replace
-
CTRL+E: Opens the recent file(s)
-
CTRL+J: Shows the available shortcodes
-
CTRL+SLASH (/): Commenting the code or line(s) of code; Remove comment - press again: CTRL+SLASH (/)
Here's one useful page as well: https://www.jetbrains.com/help/idea/2016.1/keyboard-shortcuts-you-cannot-miss.html
You can also easily create your own Live Templates, shortcodes and abbreviations in IntelliJ (and JetBrains products);
Watch the video below to set your custom live template:
https://www.youtube.com/watch?v=ZxaVNGSax80
Also this video is useful (IntelliJ IDEA Tips and Tricks):
https://www.youtube.com/watch?v=eq3KiAH4IBI