Features

Shiftless code completion and navigation in IntelliJ IDEA 10.5

With IntelliJ IDEA 10.5, you may press up to twice as less keys every day as you do now. Seriously! Here’s how.

The reason IDEs exist in the first place is that they make your life easier. In particular, they are able to generate code for you. An ideal IDE would do all the boring typing by itself, leaving you more time for thinking about the great software engineering problems you face. Unfortunately, such an ideal is not there yet. Currently, if you want an IDE to help you, you first have to help it help you. Usually this means giving it some cues on a word you have in mind, and it then tries to guess the whole word. So you can just type  NPE and smart IntelliJ IDEA will suggest that you must have meant NullPointerException. Or StBui for StringBuilder. I’m sure you get the idea. This handy “camel case” matching feature saves quite a lot of typing.

Here it gets complicated. In the first place, you had to so something (coding) and the IDE was there to help you. Now you have to do something easier, namely giving the cues to the IDE. But since this requires some action from you, why couldn’t IDE help you with this as well? This means helping you help the IDE help you :). But how can such a simple task as giving the cues be made even simpler?

As it’s easy to see from the examples, the “camel case” matching requires you to enter LOTS of capital letters. And this means pressing Shift quite often. Very often. In fact, almost always. But is this really needed? Following our colleagues from ReSharper team, we asked ourselves this question and, like they, have found no adequate reason. After that we just removed this requirement to press Shift in IntelliJ IDEA. Well, you can still do it, and the capital letters will match “camel hump” starts as they did before. But why bother if you can get the same result without Shift? OK, chances are that you’ll see a bit more variants in this case, but this still pays off in the productivity.

Shiftless matching is now everywhere in IntelliJ IDEA.

When searching for a class (Ctrl+N / Cmd+N):

When typing in the editor with the autopopup enabled:

In the File Structure popup (Ctrl+F12 / Cmd+F12):

So, grab an IntelliJ IDEA 10.5 EAP build, rest to your little fingers and enjoy!

image description