When working with code in the VS Code editor, by default, you need to use horizontal scrolling to view the entire line if it exceeds the window width.
You can adjust this behavior so that lines wrap automatically, fitting the editor’s width.
To do this, on a Mac, press ⇧⌘P, and on Windows, press F1.
A dialog box will open where you can search for «> settings».
How to Avoid Horizontal Scrolling in Visual Studio Code
Open the user settings (settings.json
) and add the following configuration:
"editor.wordWrap": "on"