问题
I am interested in if there is a mean to indicate where the writing the variable name should start
e.g if I call this live template:
console.log('$TEXT$', $TEXT$);
^
It will start writing from the first TEXT variable.
I want to start writing from the second one:
console.log('$TEXT$', $TEXT$);
^
回答1:
You cannot do that for the same variable as each variable is processed only once.
Solution:
Give them different names
console.log('$TEXT$', $VAR$);$END$(I've also added
$END$to denote final cursor position)Click on
Edit VariablesbuttonRearrange variables in desired order (using
Up/Downbuttons on the right side)Assign
TEXTvariable default text -- the value that you will enter intoVARvariable.Also check
Skip if definedif you do not plan to edit theTEXTafterwards.
Result:
Related StackOverflow question: https://stackoverflow.com/a/40606436/783119
来源:https://stackoverflow.com/questions/41630973/webstorm-live-templates-indicate-the-order-of-focusing-the-same-variable