Артур Гудиев
Артур Гудиев

Reputation: 1144

Printing variable Live Template for Javascript in IDEA

In Java code I use a live template soutv. So if I type myVar there it automatically duplicates it and the result is

System.out.println("myVar = " + myVar);

Can I create the same custom live template for Javascript code ? So the desirable result should be

console.log('myVar = ', myVar);

Upvotes: 0

Views: 123

Answers (1)

lena
lena

Reputation: 93728

you can create a live template for console.log() in Preferences | Editor | Live Templates:

enter image description here

See https://www.jetbrains.com/help/webstorm/2018.1/using-live-templates.html, https://confluence.jetbrains.com/display/PhpStorm/Live+Templates+%28Snippets%29+in+PhpStorm

Upvotes: 2

Related Questions