1

I've created a JavaScript live template which I use a lot in WebStorm:

console.log('$PARAM$ -> ', $PARAM$);

It helps me type this kind of lines faster:

console.log('nextProps -> ', nextProps);

However as it starts on the first $PARAM$ I don't get autocomplete. Is there a way to get the cursor to the second $PARAM$ while keeping the duplicated text adding?

Guy
  • 12,488
  • 16
  • 79
  • 119

1 Answers1

3
  1. Use 2 variables instead of 1
  2. Reorder them -- 2nd one should be filled first
  3. Tell IDE to auto-copy 2nd variable into 1st
  4. Tell IDE to ignore 1st variable if it has value (which it will because of #3)

enter image description here

console.log('$PARAM1$ -> ', $PARAM2$);
LazyOne
  • 158,824
  • 45
  • 388
  • 391