Automatically hard wrap lines at column in VSCode

后端 未结 6 1511
刺人心
刺人心 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 20:00

    VSCode doesn't support this out of the box. But you can install the Rewrap extension, which allows you to format the block that your cursor is currently in by pressing Alt + Q.

    Rewrap requires no further settings, since it reads VSCode's settings to obtain the column at which to break.

    Rewrap also supports automatic wrapping (off by default): https://github.com/stkb/Rewrap/wiki/Auto-wrap

提交回复
热议问题