![intellij enter vs shift enter intellij enter vs shift enter](https://www.garyfox.co/wp-content/uploads/2020/07/what-is-blue-ocean-strategy-1.png)
If the caret is at the implementation of a method in an interface (shown by a little interface-symbol to the left of the method name), this command takes you to the interface itself. The opposite of this is Ctrl + U (Go to super-method/super-class). Use this command at the method name of an interface, and you get a pop-up list of all the places where this method is implemented, and you can select which one you want to go to (if there is only one implementation, you go straight there). I use this all the time, often jumping several levels down before returning back to where I started.Ī related navigation command is Ctrl + Alt + B, (Go to implementation). As the name implies, you jump to where the variable, method or class is declared, even if it is in another file. One of the most useful commands is Ctrl + B (go to declaration). Both Emacs and IntelliJ IDEA have good commands and keybindings for all these operations.īut when it comes to navigating between files, IntelliJ IDEA has a big advantage.
![intellij enter vs shift enter intellij enter vs shift enter](https://i.stack.imgur.com/ROB8L.png)
The most common things I do within a file are: jump to the top/bottom of it, jump to the beginning/end of a line, select text, cut, copy, paste, search (incrementally) backwards and forwards, and commenting and un-commenting code. What is the name of that method you want to use? What is the order of the arguments – is it a string first, and then an integer, or the other way around? What are the possible values of that enum?
#INTELLIJ ENTER VS SHIFT ENTER CODE#
Do you need to add a new state? What other classes are using the method you need to modify? These all require navigating the existing code.Įven when you write code there is a lot of navigation. Even if you know the class well, you need to check where the new code would fit in. For instance, say you want to add functionality to an existing class. Here’s why: NavigationĬoding is really something like 80% navigation, and only 20% actual writing, and where IntelliJ IDEA really shines is navigating the code base. Without a doubt, I am much more productive writing code in IntelliJ IDEA compared to using Emacs. Four years ago, when I changed jobs, I switched to Java development using IntelliJ IDEA. For seven years I coded in C++ using Emacs.