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

This entry was posted in New Features and tagged , . Bookmark the permalink.

16 Responses to Better Code Completion in IntelliJ IDEA 12 Leda

  1. Oleg says:

    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. Peter Gromov says:

    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. John R. Nyquist says:

    Middle Matching is a great enhancement!

  4. Macdevign says:

    Please port these wonderful features to Appcode …
    :}

  5. Peter Gromov says:

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

  6. David Lim says:

    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. Peter Gromov says:

    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. John D. says:

    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. Maxim Mossienko says:

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

  10. Charlie C says:

    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. Peter Gromov says:

    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. Mark Vedder says:

    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. Davide Baroncelli says:

    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. Peter Gromov says:

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

  15. Peter Gromov says:

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

  16. Learner says:

    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.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>