A tool is just a tool. A craftsman is able to perform magic even with the simplest tools. Imagine what a craftsman can do with a tool as powerful as your IDE?
Shortcut | Action |
---|---|
2 x ⬆ | Find everywhere |
⌘+O | Find by class-->find a specific class in your code base |
⌘+⬆+O | Find by file name |
⌘+⌥+O | Find by symbol-->find indexed symbol in your code base |
⌘+⬆+A | Find all actions |
⌘+⬆+F | Find in project/find in path if you select a folder |
Shortcut | Action |
---|---|
⌘+E | Jump to recent file (You can type instead of selecting files) |
⌘+⬆+E | Go to recent locations |
⌘+Up | Bring up a floating navigation bar |
⌘+[ | Navigate back |
⌘+] | Navigate forward |
^ + Tab | Move to last file. Hold to open switcher which allows you to open last opened files or open tool |
⌘+B | Go to declaration or usages |
⌘+⬆+T | Navigate to test |
Shortcut | Action |
---|---|
^+Up | Go to previous method |
^+Down | Go to next method |
^+M | Move carret to matching brace |
F2 | Go to next compiler error |
Preferences are personal. I turn of all views as much as possible. The JetBrains IDE search tools are more powerful what any view can provide.
NOTE: Below you can find short-cuts. The ones which are bold-faced should are essentials. Make sure you know them by heart!
Shortcut | Action |
---|---|
⬆+Esc | Hide view |
⌥+F12 | Open terminal |
⌘+4 | Open run window |
^ +⌥+R | Temporarily bring up build menu Otherwise you can use ‘run anything’ |
⌘+K | Commit window |
Shortcut | Action |
---|---|
⬆+Enter | Smart new line. Add new line after this line |
⌘+⌥+Enter | Smart new line. Add new line before this line |
⌥+Up | Expand selection to next code block |
⌥+Down | Contract selection to previous code block |
⬆+⌥+Up/Down | Move line up/down |
⬆+⌘+Up/Down | Move code block up/down |
F1 | Get non intrusive information about a function |
⌘+P | Gives you the arguments within a function |
⌥+Enter | Autofix |
Shortcut | Action |
---|---|
^ + T | Refactor thisBring up a menu to refactor this piece of code |
⌘+⌥+L | Reformat code |
^ +⌥+O | Optimize Imports |
F6 | Move to file |
⬆+F6 | Refactor->Rename |
⌘+⌥+V | Introduce variable |
⌘+⌥+C | Introduce variable |
⌘+⌥+F | Introduce field |
⌘+⌥+P | Introduce parameter |
⌘+⌥+M | Introduce method |
Examples:
- 2020.const
- YEAR.if
- YEAR.log
- Look for postfix options in menu
Shortcut | Action |
---|---|
⌘+J | Open dropdown for smart templates |
Your IDE keeps track of code changes besides the version control system you use. It saved my life a couple of times, when I accidently removed a file just before committing it.
- You can use this in a file
- You can also use it in the file navigator
Shortcut | Action |
---|---|
^+⬆+R | Run current file |
Shortcut | Action |
---|---|
⬆+arrows | Create a selection of or extend current selection |
⬆+⌥+left/right | Create a selection of or extend current selection by words at a time |
⬆+⌘+left/right | Create a selection of or extend current selection until begin/end of line |
⬆+⌥+click | Multi-select |
⌘+F followed by ⌥+Enter | Search a string/regex and multiselect all instances in code |
⌘+⬆+G | Split up selection at end of line |