Better Code Completion in IntelliJ IDEA 12 Leda

As you know code completion in IntelliJ IDEA constantly evolves. Here’s a few new features coming in IntelliJ IDEA 12:

  • Middle matching
  • Class Name Completion in Basic Completion
  • Completion statistics in Productivity Guide
  • Other minor improvements

Middle Matching

First of all, we now have middle matching. It means you no longer have to write what you need from the start. You may just as well type some camel-hump word that’s in the middle of an identifier. This can be quite useful when you only remember a part of name, or if you’re just tired of those get and set prefixes.

Class Name Completion

Second, we no longer have Class Name Completion. The reason is that three different completion types is too many for people coming from other IDEs :). Besides, it’s main use case is already covered by Basic Completion (Ctrl+Space). You need just to press the shortcut twice to see all classes. But don’t despair if you’re used to it. The shortcut Ctrl+Alt+Space is still supported.

Completion Statistics in Productivity Guide

Third, now you can see how effective it is to use code completion. Go to Help | Productivity Guide and see for yourself.

There are also some enhancements in suggestion sorting and pre-selection. IntelliJ IDEA now tries even harder to guess what you want to type and suggest this options as the most relevant.

All these features are already available in IntelliJ IDEA 12 EAP. Please feel free to share feedback here or report any found bugs to our issue tracker.

Develop with pleasure!
IntelliJ IDEA Team

Comments below can no longer be edited.

16 Responses to Better Code Completion in IntelliJ IDEA 12 Leda

  1. Avatar

    Oleg says:

    July 11, 2012

    Pity that this statistic is stored inside .IntelliJIdea11system. Due to various reasons this catalog on my computer gets erased from time to time and Idea does not show any stats at the moment, but i think there are megabytes and megabytes of saved keystrokes over the years.

    Consider adding online stats, with achievements for using various Idea features =)

  2. Avatar

    Peter Gromov says:

    July 11, 2012

    Oleg, this statistics is only collected since IDEA 12 EAP, so don’t despair. It’s kept in config directory, not system. And there’s in fact another statistics coming, you’ll see it in Productivity Guide in the next EAP 🙂

  3. Avatar

    John R. Nyquist says:

    July 11, 2012

    Middle Matching is a great enhancement!

  4. Avatar

    Macdevign says:

    July 11, 2012

    Please port these wonderful features to Appcode …

  5. Avatar

    Peter Gromov says:

    July 11, 2012

    Of course, these features will be available in all IDE’s based on IntelliJ platform: AppCode, PHP-/WebStorm, RubyMine, PyCharm

  6. Avatar

    David Lim says:

    July 11, 2012

    This middle matching needs improvement. It favours the middle matching too strongly.

    When you have lots of classes prefixed with “BigSquare”, and then another set of classes prefixed with “VeryBigSquare”, trying to use ctrl-n to find “BigSquare” becomes very inconvenient. Typing “bs” never matches BigSquare in my set of classes. I have to type “BigSq” (uppercase required) to even have it show up in the first list of matched classes.

  7. Avatar

    Peter Gromov says:

    July 12, 2012

    David, Ctrl+N is not a completion, although we’ve introduced the middle matching there as well. It has some problems, you’re right. Feel free to vote for http://youtrack.jetbrains.com/issue/IDEA-88450 or http://youtrack.jetbrains.com/issue/IDEA-88240

  8. Avatar

    John D. says:

    July 13, 2012

    Would be nice if the code completion for JavaScript would be smarter. At the moment is very very primitive. E.g. For ExtJS is even catastrophic :(. IntelliJ doesn’t really seems to recognize a thing from ExtJS, even if it’s added as a library correctly. No documentation, no completion, nothing :(.

  9. Avatar

    Maxim Mossienko says:

    July 13, 2012

    2John D. Please drop some details about smarter code completion in JavaScript to YouTrack issue

  10. Avatar

    Charlie C says:

    July 14, 2012

    It would be great if the completion used the statistics to make suggestions based on what’s used the most after the initial match. When writing css for instance I use width way more than whitespace, but whitespace always shows up first and is annoying. Maybe this has changed already and I haven’t noticed it, but it would be great to include in the new autocomplete if it hasn’t.

  11. Avatar

    Peter Gromov says:

    July 15, 2012

    Charlie, there’s an issue for that: http://youtrack.jetbrains.com/issue/IDEA-81775. When we know how to fix it we surely will.

  12. Avatar

    Mark Vedder says:

    July 16, 2012

    re: Middle Matching… Not having to type set or get (or even just the ‘s’ or ‘g’) alone will save a tremendous amount of keystrokes and time. Nice.

  13. Avatar

    Davide Baroncelli says:

    July 26, 2012

    Rather than middle matching I have felt the need for correction suggestion, e.g. in cases where I somehow type a class name with a small mistake in it and wonder why IDEA is not finding anything. I would like “maybe you meant…”.

  14. Avatar

    Peter Gromov says:

    July 27, 2012

    Davide, you’re definitely not alone. You may file a feature request.

  15. Avatar

    Peter Gromov says:

    October 12, 2012

    OK, we now have a request about completion fixing typos: http://youtrack.jetbrains.com/issue/IDEABKL-6585

  16. Avatar

    Learner says:

    October 26, 2013

    Our Company uses Eclipse as IDE , so i have to follow that . But for every thing other than that i use Intellij . Its sooo much clever ,fast and its code completion is lightening , dumb eclipse used to take a lot of time for Ctrl + space here its not even required .
    One feature which is not at all there in other IDE’s (as far as i know ) is “complete the current line and go to next line (Ctrl + Shift + Enter)” i use it all the time . On coding on Intellij i feel like IDE understands my code and helps in many ways . Thanks for providing such a good product for ease of coders.

Discover more