WebStorm 编码时自动跳到下一行

WebStorm automatically go to the next line while coding

我希望当我粘贴/写入超过 X 个字符的内容时 WebStorm 自动换行,但我无法让它工作。

Editor > Code Style > Default Options > Right Margin > 设置为 120 并启用 "wrap on typing"

Editor > General > Soft Wraps > Use soft wraps in editor 已启用

View > Active Editor > Use Soft Wraps 已启用。

图片:

选中此框:Editor > Code Style > [x] Wrap when typing reaches right margin。但是,这不适用于粘贴文本,但您可以在粘贴后键入一些内容(如 space)以强制换行。

您也可以查看您的代码风格设置。在您的示例 (JS) 中,转到 Editor > Code Style > JavaScript > Wrapping and Braces 并调整您的设置。