Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hidden Features IntelliJ IDEA [closed]

People also ask

How do I open a closed tab in IntelliJ?

To reopen the closed tab, right-click any tab, and from the context menu, select Reopen Closed Tab. To open a new tab at the end of the already opened one, select the Open new tabs at the end in the tab settings.

What does Ctrl Alt l do in IntelliJ?

If you choose Code | Reformat Code from the main menu or press Ctrl+Alt+L , IntelliJ IDEA tries to reformat the source code of the specified scope automatically. For more details on how to reformat, or exclude files from formatting, refer toReformat code.

How do I fix my IntelliJ IDEA?

From the main menu, select File | Repair IDE. IntelliJ IDEA will automatically launch the first recovery step and refresh the virtual file system. IntelliJ IDEA will display a notification that you can use to continue or complete the recovery process.


Help -> Productivity Guide: See all the fun you've been missing out.


I love syntax-aware selection. Control + W.

When I'm forced to work with other IDEs, that key sequence usually causes files to close. It's a nasty negative feedback loop.


Shift-F7 (Smart Step Into) is a useful debugging feature that I haven't seen with other IDE's. I also like CTRL-J to pull up Live Templates, and (unrelated) CTRL-SHIFT-J to merge the next line with this one.

Update

Got a few more:

  • Ctrl-Alt-F7 to show usages in a pop-up list
  • Call Hierarchy is like a more through "find usages" and shows a tree that traces method calls leading to the current code

I've got a few extra mouse buttons, so I have bound each of these to the buttons for fast access.


Shift Control Space

I love Shift + Control + Space for code completion, it is not a secret thought. You can use it everywhere - in a Spring configuration file, at the right side of an attribution, to complete a method call, to pass a parameter.

The nice thing about it is that if you have a parameter of type "X" inside an object "y", when you press Shift + Control + Space twice, it will actually display "y.X" as one of the possible options. I guess I could classify that as a secret :-).

Other shortcuts that I use often are Shift + Insert to generate code (such as equals and hashcode, or a constructor to initialize my final variables), Ctrl + I and Ctrl + O to implement/ override methods, Alt + Enter to fix a compilation error/ warning (a code inspection suggestion).


CTRL+ALT+V - For variable extraction

CTRL+ALT+M - For method extraction

I use the above shortcuts very frequently.