I always like to look for a way to expand my skills as a developer. One of the areas where you can always improve your efficiency is "know your tools".
I sometimes google for Top 10 something. For example:
- Top 10 RubyMine plugins
- Top 10 tools for K8s management
- Top 10 Rails gems
This often helps me to learn about what's new in the wild but also satiates my inner boy/child necessity for playing with some new toys :D.
Key shortcuts are something which I always like to learn. They can greatly improve your effectiveness. So today I wanted to share with you my top 10 shortcuts for RubyMine on a macOS. I guess they'll work in all JetBrains products.
⌘ + ⇧ + A
This will show you a prompt where you can run any IDE action. Be it git, selecting text, refactoring, preferences etc.
⌘ + ⇧+ G
Select all occurrences. Without shift, it will select next occurrence
⌘ + d
Duplicates currently active line. You can also use it for larger chunks by selecting e.g. a code block.
⌘ + O
⌘ + ⇧ + 8
Enter multiline mode
There are a few ways you can use it
- you can select multiple lines and then press the shortcut
- you can run shortcut and then press shift and hit down arrow to multiply carets
Commit changes to git
This is actually a whole sequence
- ⌘ + k - open commit window
- ⌃ + ⌥ + i - commit
- ⌘ + ⇧ + k - push
Go to declaration / Show usage
⌘ + b
Depending on where you are it goes to either declaration, or shows usage
⌘ + e
Show recently opened files
Second press shows recently edited files
It opens the refactoring menu. Useful if you are currently doing Anti-If course from Arkency ;)
Run / Debug
⌃ + ⇧ + r / ⌃ + ⇧ + d
Run / debug this test or file depending on the context.
Without shift, it runs the file/test that was run as the last.
⌥ + space
Shows content of the class or method in a popup window
Key Promoter X
There is actually a very nice plugin for JetBrains tools that will help you to learn shortcuts for all the shortcuts you are doing with your mouse, and it will suggest it to you if it learns that you are doing this particular action many times.