Favorite IntelliJshortcuts, templates, settings,preferencesAlexey Novakov, Gustav KarlssonDevMeetup 360T
View Slide
ShortcutsWe use daily
Generate CodeAlt + Ins (Mac: Ctrl + N)
Run OptimizationAlt + Enter
Safe DeleteAlt + Del(Mac: Ctrl + Fn + Del)
Find any Command or OptionCtrl+ Shift + A(Mac: CMD+ Shift + A)
Extract Method, Field, Variable,Constant, ParameterCtrl+ Alt + M / F / V / C / P
Rename any Method, Reference, Class,PackageShift+ F6(Mac: + Fn)
Optimize ImportsCtrl + Shift + O(Mac: Alt + CMD + O)
Code FormattingCtrl + Alt + L(Mac: Alt + CMD + L)
Pull Members Up / Downvia Ctrl + Shift + A
Run ConfigurationCtrl + Shift + F10 or F9 to Debug
Hot Swap of ClassesCtrl + Shift + F9(Mac: CMD + Fn + F9)
Pull & Push ChangesCtrl + T & K
Revert ChangesCtrl + Alt + Z(Mac: CMD + Alt + Z)
Compare two files in the treeCtrl + D
Live templates
System.out.printlnsout
for loop with indexforifor (int i = 0; i < _ ; i++) {}
for each loopiterList quantities = distributeQuantity(executeOrder.quantity);for (Integer quantity : quantities) {}
public static final modifierspsfpublic static final
main methodpsvmpublic static void main(String[] args) {}
Plugins
GenerateSerialVersionUIDprivate static final long serialVersionUID = -8258293264975874325L;
Key promoterAnalyzes your mouseclicks and shows Shortcutfor the same action
Misc.
Scratch fileTools -> New Scratch File orCtrl+Shift+Alt+InsertUseful to experiment with some code snippet
Shelve ChangesQuite similar toGit Stash, butShelve is kept inIntelliJ