A month of IntelliJ shortcuts
I like using the keyboard shortcuts IntelliJ provides. I think they are cool and help me code faster. However, I wanted to learn more of them, so I decided to learn one shortcut a day for one month. And that’s how this list was born.
PS: Before starting, I should mention I’m using the below keybindings for IntelliJ Idea Classic and I’m on a Mac laptop.
If you’re using a different keymap or a Windows or Linux machine, your keyboard shortcuts may be a bit different, but I’m sure just a bit of Googling would be enough to help you find the corresponding shortcuts for your specific machine/keymap.
And it’s also worth it noting that it’s possible to create custom shortcuts as well. Anyways, let’s not delay this any longer. Here is my list. (Ah, wait, just another thing! Whenever you see + after Command or Control it means And, so I’m just saying you should type that key *And* the one mentioned after it.)
Day 1 — Open Settings Terminal: [Command] + [,]
Day 2 — Open Project Left Side Tree: [Control] + [1]
Day 3 — Run application (or whatever is the last thing you ran): [Shift] + [F10]
Day 4 — Run application in debug mode: [Shift] + [F9]
Day 5 — Stop program execution: [Command] + [F2]
Day 6 — Refresh DB: [Control] + [F5]
Day 7 — Create new package, class or file: [Control] + [N] (after having the parent folder selected)
Day 8 — Open DB properties: [Shift] + [Enter]
Day 9 — Close current tab: [Command] + [F4]
Day 10 — Navigate to current file on left tree: [Option] + [F1] then [1]
Day 11 — Add file to Git: [Command] + [Option] + [A]
Day 12 — Add import: [Alt] + [Return]
Day 13 — Reformat code: [Command] + [Option] + [L]
Day 14 — Create variable: [Command] + [Option] + [V] (if used within the pom file it can also extract pom properties)
Day 15— Add and/or remove debug breakpoint: [Command] + [F8] (with line selected)
Day 16— Optimize import: [Command] + [Option] + [O]
Day 17 — Reload maven pom file: [Command] + [Shift] + [O]
Day 18 — Surround code by if, if else or try and catch, etc: [Command] + [Option] + [T]
Day 19— Rename: [Shift] + [F6]
Day 20 — Delete line: [Command] + [Y]
Day 21 — Duplicate line or selected group: [Command] + [D]
Day 22 — Navigate to class or method declaration: [Command] + [B]
Day 23 — Navigate to implementation: [Command] + [Option] + [B]
Day 24 — Hide active panel: [Shift] + [Esc]
Day 25 — Close all panels: [Command] + [Shift] + [F12]
Day 26 — See recent locations: [Command] + [Shift] + [E] (twice for filtering for edited files)
Day 27— Fold all methods: [Command] + [Shift] + [-]
Day 28— Unfold all methods: [Command] + [Shift] + [+]
Day 29— Navigate to top of the file: [Command] + [Fn] + [Left Arrow]
Day 30 — Navigate to bottom of the file: [Command] + [Fn] + [Right Arrow]
So here we have our 30 days done! Awesome! However, as I enjoyed doing this I actually did a bit more than 30 shortcuts, those which I also have here under the Extras section below. If I find some more shortcuts I like, I’ll try and keep bringing them here. And that’s it from my side today. See you next time. :)
Extras
Day 31— Open Debug window: [Option] + [F8]
Day 32 — See recent git changes: [Command] + [9]
Day 33 — Switch to another open project: [Command] + [Option] + [Square brackets] (previous or next project depending on right or left bracket)
Day 34— Execute (i.e sql query): Command + Return