64

Just another Hidden features and tips and tricks WIKI.

After seeing the hidden features of eclipse, java, spring framework I thought we need to have a list of the features, TIPS for IntelliJ too which is the best and the Intelligent IDE available for java.

casperOne
  • 73,706
  • 19
  • 184
  • 253
Teja Kantamneni
  • 17,402
  • 12
  • 56
  • 86

10 Answers10

66

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

AdrieanKhisbe
  • 3,899
  • 8
  • 37
  • 45
Iraklis
  • 2,762
  • 1
  • 24
  • 31
  • 1
    The plugin "mouse feed" (showing the correspondive shortcut on mouse triggered actions if a shortcut is defined) was like the very next i discovered right after the productivity guide. – JBA Mar 12 '15 at 07:56
  • I think it's called [Key Promoter](https://plugins.jetbrains.com/plugin/1003) now. – aliteralmind Sep 07 '15 at 01:24
59

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.

Noel Ang
  • 4,989
  • 1
  • 25
  • 19
  • 20
    You sure that isn't a positive feedback loop? After all, it causes you to stop using those *other* IDEs. :P – Alex Feinman Mar 26 '10 at 17:35
  • 4
    For people with other keymaps: this command is called "Select Word at Caret" and "Unselect Word at Caret". I prefer the binding that the OS X keymap has, which is Alt+Up and Alt+Down – Neil Traft Oct 17 '11 at 16:19
  • It's a brilliant feature for sure! This is my productivity guide for PHPStorm, another JetBrains IDEA IDE: http://i.imgur.com/2bloY7k.png – Tim Visée Sep 10 '15 at 20:41
  • Very nice feature certainly but why did they take Control + W? This is indeed a very common shortcut (also in the browser you are reading this in) to close tabs. It's one of the first shortcuts I modified. – Stijn Geukens Oct 29 '15 at 15:50
  • 1
    The other negative/positive feedback loop is **CTRL + Y**: it will delete a line in IntelliJ while it will _redo_ in most of other IDE and editors. Sometimes it's destuctive. – qwlice Nov 10 '15 at 10:37
18

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.

AdrieanKhisbe
  • 3,899
  • 8
  • 37
  • 45
Jon Onstott
  • 13,499
  • 16
  • 80
  • 133
12

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).

Ravi Wallau
  • 10,416
  • 2
  • 25
  • 34
12
CTRL+ALT+V - For variable extraction

CTRL+ALT+M - For method extraction

I use the above shortcuts very frequently.

DonX
  • 16,093
  • 21
  • 75
  • 120
10

The one I very frequently see under utilised is Crtl-Alt-F7 (⌘⌥-F7 in OS X), which is show usages. Much faster than "find usages". Both are indispensable for understanding code and how it is used.

Another one hidden away is column mode, which allows you to highlight and even replace code vertically. The shortcut for this is Ctrl-Shift-Insert (⌘⇧* in OS X).

AdrieanKhisbe
  • 3,899
  • 8
  • 37
  • 45
rhys keepence
  • 246
  • 1
  • 3
9

What about starting with the Intellij version of the most voted response on the Hidden features of Eclipse post? =)

Don't forget Ctrl+Shift+A, which displays a list of all the keyboard shortcut combinations (just in case you forget any of those listed here).

also:

I also suggest to print out the official: Intellij IDEA 9 Default Keymap: WINDOWS-LINUX, OS X, OS X 10.5+

Community
  • 1
  • 1
mickthompson
  • 5,442
  • 11
  • 47
  • 59
6

the iteration based live templates seem to save more typing than any other feature, my own templates which I use frequently:

private final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger($CLASS_NAME$.class);

(add optional static keyword after private according to taste) where the variable CLASS_NAME is defined to have the expression className() and check "Skip if defined", together with

logger.debug("$END$");
Stefan L
  • 1,529
  • 13
  • 20
Paul McKenzie
  • 19,646
  • 25
  • 76
  • 120
6

Closure Folding makes Java programming slightly more tolerable after writing Scala.

retronym
  • 54,768
  • 12
  • 155
  • 168
1

From persistence tool Window you can see the diagram of your database structure by clicking Open ER Diagram very useful tool

Jama A.
  • 15,680
  • 10
  • 55
  • 88