Automatically hard wrap lines at column in VSCode

后端 未结 6 1505
刺人心
刺人心 2020-11-29 19:11

How can I automatically hard wrap lines in VSCode? By that I mean if a line reaches a specified column, automatically insert a newline at the word boundary closest to that c

6条回答
  •  迷失自我
    2020-11-29 19:58

    Hard Wrap Comments

    Use the Rewrap extension.

    Soft Wrap Code

    Add the following setting (replace column width with your preference): "editor.wordWrapColumn": 100

    Then add either "editor.wordWrap": "wordWrapColumn" (wraps at the column) or "editor.wordWrap": "bounded" (wraps at either the column or the viewport).

    Hard Wrap Comments and Soft Wrap Code

    Unfortunately the extension and VSCode settings do not play nicely.

    Feel free to upvote this feature request.

提交回复
热议问题