0

Created the following JS live template:

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

That can generate this:

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

I would love to have auto completion within the string. OR have me edit the second $var$ and make the first one be the same.

Any way to accomplish that?

Playing with "edit variables" completion() and smartCompletion() did not seem to auto complete the local variables.

LazyOne
  • 158,824
  • 45
  • 388
  • 391
Guy
  • 12,488
  • 16
  • 79
  • 119
  • 1
    *"OR have me edit the second $var$ and make the first one be the same."* https://stackoverflow.com/a/41634968/783119 – LazyOne Jul 24 '17 at 08:09

1 Answers1

0

OK, choosing the JsArrayVariable() expression in the "edit variables" modal seem to be working as mentioned in the docs.

Couldn't find it at first as the docs's description of JsArrayVariable is not very clear:

JsArrayVariable: Returns JavaScript array name.

IMHO, a better description would be "Auto-select from a list of scope variables".

Guy
  • 12,488
  • 16
  • 79
  • 119