Javascript multi-line variable declarations and code formatter
I am new to WebStorm, and it seems to have endless options for formatting JavaScript code, but one thing it appears to be missing is a way to control how long variable declarations are formatted.
ex:
function something() {
var myVar, myOtherVar, yetAnotherVar = 3;
}
Could get reformatted to:
function something() {
var myVar,
myOtherVar,
yetAnotherVar = 3;
}
Am I missing something here?
Please sign in to leave a comment.
Hi,
Please see: http://youtrack.jetbrains.com/issue/WEB-884 .
It's already implemented in WebStorm 8.0 EAP: http://confluence.jetbrains.com/display/WI/WebStorm+EAP .
Sorry, I guess I should've searched through the bug list first. Good news, thank you!
@liubov The issue discussed here doesn't relate to the links you provided. WEB-884 is about indentation alignment, this question was about splitting a var declaration over multiple lines.
As far as I can see we don't have the option to do that anywhere.
the feature you are looking for will be available in 2017.1 - see https://youtrack.jetbrains.com/issue/WEB-12581#comment=27-1889709