0

In IntelliJ live templates one can use $END$ to specify where the cursor should be placed once the template is expanded.

Is there a way to place multiple carets? Specifying multiple $END$ locations doesn't work. I sometimes need to type the same text into several places for what can be an auto-generated piece and that would be a nice expansion of functionality.

Currently as a solution I use "surround templates" where I can first type some text and then use $SELECTION variable.

LazyOne
  • 158,824
  • 45
  • 388
  • 391
Dmitry Avtonomov
  • 8,747
  • 4
  • 32
  • 45
  • 1
    *"In IntelliJ live templates one can use `$END$` to specify where the cursor should be placed once the template is expanded."* Yes, it will be, but in the simplest case. `$END$` specifies where the caret will be placed when all placeholders/variables will be resolved. And if you have no variables .. then yes, it will work that way. – LazyOne Aug 20 '22 at 10:39
  • 1
    Please provide a code sample/your template where it can be clearly seen where you want your inputs to be made (i.e. "this is what I have and this is what I want to make in the end/final result"). Based on your description so far, just having a variable (the same one) in those places should do the job for you. – LazyOne Aug 20 '22 at 10:41

0 Answers0