15 IntelliJ IDEA shortcuts every developer should know

As a developer, it is very important to work productively and efficiently. This includes shortcuts, which are essential to work quickly and reduce mouse movements.

However, beginners often don’t know which shortcuts are available or forget to use them. For this reason, in this post I will give you 15 shortcuts for IntelliJ IDEA, Android Studio and almost all other Jetbrain IDEs that have massively improved my workflow. At the end of this post I will give out 2 tips for plugins that will help you learn these and more shortcuts super fast. Let’s get into it!

This shortcut is one of the most essential because it saves you a lot of mouse movements. You can use it to start the program you are programming to test it.

Similar to the previous shortcut, this one terminates the currently running program.

Another important shortcut is SHIFT + F9. With this you can easily debug your program.

Again, in line with the previous shortcut, you set a breakpoint for the line you are currently in.

This is another very useful shortcut. If you have just started your program with SHIFT + F10, the console always appears. Windows like the console or the terminal can be minimised with SHIFT + ESC. This works for all windows that have the small minus in the upper right corner.

This is another very essential shortcut. You can use it to rename classes, packages, files, methods, etc. This is very useful for classes and methods. This is very handy for classes and methods, because if you rename them with IntelliJ IDEA’s built-in function, they will be changed everywhere in every class.

Everyone should know this shortcut. It takes you to the IntelliJ IDEA settings, where you can create a keymap, download plugins and much more.

Everyone knows it, you have a mistake and don’t know what you are doing wrong. Fortunately, IntelliJ IDEA has a context menu that suggests fixes. This can be opened by placing the text cursor on the error and then typing ALT + Enter.

Sometimes you have several errors at the same time. To quickly switch between different errors, you only have to press F2 and you will get to the next error. If you press SHIFT + F2, you go to the previous error.

Code must be readable. To achieve this, IntelliJ IDEA structures your code with this shortcut.

When you are writing or editing code in a file, you want to focus on it. With ALT + 1 you can minimise the project window. If you want to jump to another class afterwards, you can open it again with the same shortcut.

When you are in the project window, you want to jump to a file quickly without touching your mouse. By just starting to write, IntelliJ IDEA will find that file for you. If a class is close to your current one, you can navigate up and down using the arrow keys. To open the selected file, simply press ENTER. If you did not want to jump to the file you are looking for, you can also easily jump back to your currently opened class by pressing ESC. There are now even 4 shortcuts.

When you have a method or class, sometimes you want to know where it is used. You can do this easily with ALT + F7.

To make code understandable and readable, you need to add comments. You can do this very quickly with CTRL + /. If you don’t want to comment a line anymore, you can use the same shortcut. To comment a complete block of code, use SHIFT + CTRL + /. Again, use the same shortcut to stop commenting a block.

This shortcut is very important when working quickly with several files. It allows you to easily see and open the most recently opened files.

Here is another tip to learn the shortcuts of IntelliJ IDEA very quickly:

IntelliJ IDEA has a plugin called “ForceShortcuts”. This plugin locks any action for which there is a shortcut that you have performed with the mouse. Instead, it shows you a small pop-up at the bottom of the screen, telling you how to perform the action with a shortcut. So you can ONLY execute the action with a shortcut, not with a mouse.

Also, there is a plugin called “KeyPromoterX” which doesn’t block the actions but clearly recognises more shortcuts.

That’s about it. If you liked this post, share it with your friends and feel free to tell me if there should be a second part or what I can do better. If I forgot a shortcut that is very important for you, please share it with us!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Tomic Riedel

Flutter, Dart & Appwrite Developer | Livelong learner | Happy about sharing my knowledge