Tips & Tricks

30 Days with IntelliJ IDEA. Code Completion

We continue to publish new articles from the 30-day guide on the most tricky features of IntelliJ IDEA. Today we would like to share with you the next article, about the code completion assistance.

Middle matching

Not everyone knows that since IntelliJ IDEA 12 the IDE supports so-called Middle matching. It means that you don’t necessarily need to type an identifier from the beginning. For example, if you only remember a part of the name, just type it and IntelliJ IDEA will still find the right matches for you.

Quick popups

One more tricky feature of code completion is support for quick popups such as Quick documentation (via Ctrl + Q, or Ctrl + J for Mac) or Quick definition (via Shift + Ctrl + I, or Shift + Cmd + I for Mac). These popups are available when you browse suggestions in code completion. In many cases Quick Definition info is more useful than even documentation, especially when you are not sure, which method is to use.

Please find the complete article about the available code completion features here.

Stay tuned for more articles soon, and develop with Pleasure!

Comments below can no longer be edited.

9 Responses to 30 Days with IntelliJ IDEA. Code Completion

  1. Avatar

    .we says:

    May 27, 2013

    I’m missing one thing in IDEA – a completion similar to NetBeans – i.e. for .println – I can type “pri”, in the popup there will be a few items for “print” followed by “println” and I have an option – type “.” to autocomplete to the currently selected method ( “print” ) or use “TAB” to automatically complete text to the next common stem (in this case still “print” with still available list of suggestion) in which case I can type “l” and then hit “.” again to have “println” – way faster, highly convenient and doesn’t require using arrows to select different suggestion…

  2. Avatar

    Tropper says:

    May 27, 2013

    Isn’t Quick documentation Ctrl+Q ? Ctrl+J is insert live template. I’m pretty sure I did not change these both myself.

    Quick definition is really awesome. I wasn’t aware it also works on methods. 🙂

  3. Avatar

    Andrey Cheptsov says:

    May 27, 2013

    @Tropper, My mistake – fixed, thanks!

  4. Avatar

    Patrick says:

    May 27, 2013

    @.we: You can wirte your own live templates (Settings->Live Templates) for this job.

  5. Avatar

    .we says:

    May 27, 2013

    this is completely different from what I want…

  6. Avatar

    armsargis says:

    May 27, 2013

    @.we: type ‘sout’ + TAB

  7. Avatar

    Mehdi Hasan says:

    May 28, 2013


    Any chance of starting a newsletter only for this “30 Days with IntelliJ IDEA” articles?


  8. Avatar

    Arthur Oysgelt says:

    May 28, 2013

    Is there a way to configure the autocompletion to prepend rather than replace the string at which the cursor is located?

    i.e. if I have a snippet
    followMe(foo, bar);
    and I start to type right before followMe, can the autocompletion be configured so that it simply adds the suggestion before the cursor, rather than replacing followMe and what I have typed?

  9. Avatar

    .we says:

    May 30, 2013

    I don’t want type ‘sout’+TAB… System.out was just an example of how to autocomplete any method/field…

Discover more