If you’re an IT developer then these IDE hotkeys would be very helpful. IT loves productive developer and productive love hotkeys.
If you also want to become an expert developer, then start doing hotkey. So I brought you the top 10 IDE hotkeys. Initially, when I started my first job, I used to be very slow due to a lack of knowledge of hotkeys.
Now I am using some IDE hotkeys which I am sharing with you. It is not possible to make all hotkeys tutorials in a single article. It’s not possible to create one universal hotkey tutorial – there are few keymaps out there – most popular are based on Eclipse and Netbeans.
I will review Netbeans’ ones. For the sake of simplicity, I named the keys using Windows naming. If you are a Mac user just press CMD instead of CTRL.
So let’s start our ride.
Alt + Shift + Up/Down arrows
Used for moving the current line of code up or down. When we have selected block of text it naturally moves the entire block.
[tmh_article_ads]
Ctrl + Shift + Up/Down arrows
Duplicates the current line of code. In Jetbrains’ IDEs: IntelliJ or PHPStorm it only copies the current line below. In Netbeans however it’s possible to copy line up – there is a slight difference in where is your cursor after using the hotkey.
Ctrl + J
In Netbeans’ keymap described as “Extend selection” which may be confusing. As you see on the GIF I don’t have anything selected at the beginning so “Extending” this selection is misleading. Selects the entire word/name.
Shift + Alt + O
Opens “Open file by name” popup. What is interesting typing the name of the file using only first letters of camel-cased segments helps quickly opening files with a complex name?
Ctrl + Shift + 1
Find a current file in a directory tree and expand this particular tree branch. Jetbrains products add the ability to automatically reflects opened file in the directory tree. Personally I do not use this feature.
Alt + Shift + F
This hotkey formats the current file. Or if we have an active selection, formats only selected piece of code.
Ctrl + E
Removes the current line of code. It works also for selection.
Ctrl + /
Comment / uncomment current line of code
Ctrl + Alt + Left / right arrow
Selecting consecutive word/expression fragments. If it’s CamelCased name – particular fragments will be selected. If it’s entire expression then adjacent operators and arguments will be selected step by step.
Ctrl + R
Rename current element (method, variable, class etc). Replaces automatically all other occurrences.
More hotkeys, please
So that’s part one of my favorite IDE hotkeys selection. In the next episode of this article, I will present a few shortcuts mostly related to code generation and dealing with automated tests.
I hope that by writing this article I will encourage at least one person to go more towards mouseless navigation.
Share your thoughts