Choose position of cursor after a live template

Intellij IdeaJetbrains IdeLive Templates

Intellij Idea Problem Overview


In IntelliJ IDEA, I have defined a live template like this:

@Inject
private void postInject() {
  //I want the cursor to be placed here after the execution of the live template.
}

Is there a way to tell IntelliJ to place the cursor inside of the method body after expanding the live template?

Intellij Idea Solutions


Solution 1 - Intellij Idea

Sure. Just put the special $END$ variable to that position.

Help documentation: https://www.jetbrains.com/help/idea/template-variables.html#pdtv

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionArnaud DenoyelleView Question on Stackoverflow
Solution 1 - Intellij IdeaPeter GromovView Answer on Stackoverflow