在实时模板后选择光标位置

Arn*_*lle 54 jetbrains-ide intellij-idea live-templates

在IntelliJ IDEA中,我已经定义了一个这样的实时模板:

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

有没有办法告诉IntelliJ在展开实时模板后将光标放在方法体内?

Pet*_*mov 113

当然.只需将特殊的$ END $变量放到该位置即可.

  • 请注意,如果存在未标记为“如果已定义则跳过”的变量,则光标将在到达 $END$ 之前首先浏览它们。 (7认同)
  • 我在哪里可以找到这方面的文档? (2认同)
  • 在https://www.jetbrains.com/idea/help/creating-and-editing-live-templates.html (2认同)
  • https://www.jetbrains.com/help/idea/template-variables.html 这是有关此功能的文档。 (2认同)
  • 是否可以添加多个停靠点并通过 TAB 按钮跳转到下一个停靠点? (2认同)