IntelliJ File Template cursor position

后端 未结 2 1894
北海茫月
北海茫月 2021-02-19 01:00

I\'m trying to create an IntelliJ file template that will place the cursor at a specific point in the file. The live templates have $END$ to place the cursor in a position afte

相关标签:
2条回答
  • 2021-02-19 01:30

    It's possible. First, check the "Enable Live Templates" box, then insert #[[$END$]]# at the point where you want the cursor to appear. The HTML4 File template uses this same variable, so you can refer to it also.

    Additionally if you would like to use selection feature you can do so by defining adding the variable #[[$MyVar$]]# to your template.

    0 讨论(0)
  • 2021-02-19 01:32

    I don't think it's possible. IntelliJ is only using the standard Velocity template engine.

    0 讨论(0)
提交回复
热议问题