Search code examples
intellij-ideaparenthesescode-completion

In IntelliJ code complete, how can I make the cursor end up inside the parens, not after them


When using code completion for beginner tutorials in IntelliJ, it keeps putting the cursor after the parens, forcing me to hit the left key each and every time.

Using a pipe to represent the cursor: "printl" completes to "println()|" when what I need is "println(|)"

With the second, if you type a " after completion you would get println("") but at the moment what I get is println()""

I know it seems a simple thing but when you have to keep moving your right hand off the keys in order to hit the <- arrow for about 75% of your lines, it becomes the thing that slows you down and gets old really fast.

Thanks, Scott


Solution

  • Using a Live Template with $END$ in between the quotes was exactly what I needed.

    Now if I could just figure out either how to edit the stock println() to include the $END$ or make my live template show on the top of the list instead of the bottom.

    Having to reach over to select the right template kind of defeats the purpose of making one so I don't need to reach over to move the cursor lol