salep
salep

Reputation: 1380

WebStorm automatically go to the next line while coding

I want WebStorm automatically go to a new line when I paste / write something that's longer than X characters, but I couldn't make it work.

Editor > Code Style > Default Options > Right Margin > Set to 120 and enabled "wrap on typing"

Editor > General > Soft Wraps > Use soft wraps in editor is enabled

View > Active Editor > Use Soft Wraps is enabled.

Image:

enter image description here

Upvotes: 0

Views: 306

Answers (1)

Darek Kay
Darek Kay

Reputation: 16649

Check this box: Editor > Code Style > [x] Wrap when typing reaches right margin. However, this doesn't work for pasting text, but you may type something (like a space) after pasting to force the wrap.

You may also look into your code style settings. In your example (JS), go to Editor > Code Style > JavaScript > Wrapping and Braces and adjust your settings.

Upvotes: 2

Related Questions