"Reformat Code" command should respect right margin
If I set my right margin to 80 chars in Preferences > Code Style, I noticed when I reformat my code that I have split to multiple lines, WebStorm will change the code and put it on one line so it goes outside my margin.
请先登录再写评论。
What language is it about? Please provide code sample that shows up the issue
It's a JSX file. This is the snippet in question:
Even if I put a newline after the &&, if I run Reformat Code, it puts it back on one line, going past the right margin (80 chars).
Try changing 'Binary expressions' (Settings/Code Style/javaScript/Wrapping and Braces) to 'Wrap if long'
That worked! You guys rock. :) There are so many options, it's sometimes hard to know what they are
Thanks!