When using code files, you typically don't need longer lines to wrap around. However, with .md
files this is in fact rather useful. However, I can't seem to find the option to enable word wrap so longer lines will be wrapped.
To reproduce, open Visual Studio Code resized to a small-enough window, and enter the following text in a new document:
This is my test lorem ipsum. This is my test lorem ipsum. This is my test lorem ipsum. This is my test lorem ipsum. This is my test lorem ipsum. This is my test lorem ipsum. This is my test lorem ipsum. This is my test lorem ipsum. This is my test lorem ipsum. A linebreak before this.
The effect is this:
I'm trying to get the horizontal scrollbar to stay away, having line 1 wrap around at the right side of the window.
I've done a few things to answer my own question:
Perhaps it's not possible, and I'd need to file a feature request? Or am I missing something?
Note that I'd like to be able to turn it on and off quickly. For one, @PanagiotisKanavos mentioned in comments this solution to change wrapping behavior in the settings, but I'm looking for a quick command or menu option to do this (much like Notepad++ and Sublime Text 2 have).
wordWrap": "on" You can toggle word wrap for the VS Code session with ⌥Z (Windows, Linux Alt+Z).
Go to File->Preferences->Settings. Set the workspace tab (but it's the same with User tab) Set the editor: Word Wrap settings to wordWrapColumn. Set the Editor: Word Wrap Column to 80.
Right-click the control for which you want to enable or disable text wrapping, and then click Control Properties on the shortcut menu. Click the Display tab. Select or clear the Wrap text check box.
Since v1.0 you can toggle word wrap:
It can also be controlled with the following settings:
Known issues:
If you'd like these bugs fixed, please vote for them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With