Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Favorite IntelliJ shortcuts

Favorite IntelliJ shortcuts

7a04b88e1469561db6da3818348d4b8f?s=128

Alexey Novakov

September 01, 2016
Tweet

Transcript

  1. Favorite IntelliJ shortcuts, templates, settings, preferences Alexey Novakov, Gustav Karlsson

    DevMeetup 360T
  2. Shortcuts We use daily

  3. Generate Code Alt + Ins (Mac: Ctrl + N)

  4. Run Optimization Alt + Enter

  5. Safe Delete Alt + Del (Mac: Ctrl + Fn +

    Del)
  6. Find any Command or Option Ctrl+ Shift + A (Mac:

    CMD+ Shift + A)
  7. Extract Method, Field, Variable, Constant, Parameter Ctrl+ Alt + M

    / F / V / C / P
  8. Rename any Method, Reference, Class, Package Shift+ F6 (Mac: +

    Fn)
  9. Optimize Imports Ctrl + Shift + O (Mac: Alt +

    CMD + O)
  10. Code Formatting Ctrl + Alt + L (Mac: Alt +

    CMD + L)
  11. Pull Members Up / Down via Ctrl + Shift +

    A
  12. Run Configuration Ctrl + Shift + F10 or F9 to

    Debug
  13. Hot Swap of Classes Ctrl + Shift + F9 (Mac:

    CMD + Fn + F9)
  14. Pull & Push Changes Ctrl + T & K

  15. Revert Changes Ctrl + Alt + Z (Mac: CMD +

    Alt + Z)
  16. Compare two files in the tree Ctrl + D

  17. Live templates <abbreviations + TAB>

  18. System.out.println sout

  19. for loop with index fori for (int i = 0;

    i < _ ; i++) { }
  20. for each loop iter List<Integer> quantities = distributeQuantity(executeOrder.quantity); for (Integer

    quantity : quantities) { }
  21. public static final modifiers psf public static final

  22. main method psvm public static void main(String[] args) { }

  23. Plugins

  24. GenerateSerialVersionUID private static final long serialVersionUID = -8258293264975874325L;

  25. Key promoter Analyzes your mouse clicks and shows Shortcut for

    the same action
  26. Misc.

  27. Scratch file Tools -> New Scratch File or Ctrl+Shift+Alt+Insert Useful

    to experiment with some code snippet
  28. Shelve Changes Quite similar to Git Stash, but Shelve is

    kept in IntelliJ