How does VScode set the default automatic line break settings

After VScode is installed, it cannot automatically wrap the line by default. When the text exceeds the display, you need to drag the slider below to see the excess part, as shown in the figure, which looks very inconvenient.

word wrap

In order to make it easier to read the code, we can set the automatic line wrap display. Select the menu "View-Switch Automatic Line Wrap" to automatically wrap the line, or directly press the shortcut key "ALT+Z" to set it.

Unfortunately, this setting cannot be saved, and it must be reset every time it is needed, which is very troublesome.

permanent line break

So, how to set permanent word wrap?

1. Go to File>Preferences>Settings, open the setting interface, find the Editor:Word Wrap option under Common Settings, the default is off, set it to on. as the picture shows:

2. After the setting is complete, you can find that the automatic line wrapping function has been enabled for the document.

Guess you like

Origin blog.csdn.net/cljdsc/article/details/130232608