suppose I have a code

var val = event.deltaX;

how can I auto insert a code which will transform the above into

if(event.deltaX)
{
x = event.deltaX;
}
有帮助吗?

解决方案

You can try using live templates for this - see surround live templates.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top