Search code examples
intellij-ideavisual-studio-codewebstormlive-templates

Numeric Placeholders like VSCode Snippets in IntelliJ Live Templates


In VSCode there are numeric tab-stops or placeholders like $1, $2, ...

So in VSCode JS Snippets,

import ${2:objectIWantToImport} from ${1:package}

first stops on package placeholder and then goes back to objectIWantToImport placeholder

But in IntelliJ WebStorm I have tried similar something to this,

import $2$ from "$1$";

which doesn't work. The tab-stops are serial from left to right.

How do I get a way around it to first stop on 1 and then on 2.


Solution

  • You can click on Edit Variables button in the Live Template settings and swap the table lines there, that'll change the order the placeholders are visited.