I am using windows and VS Code, I have few files that I do not need to wrap them wherever I press Alt+Shift+F, is there a way to disable auto format wrapping for specific files?
Visual Studio Code: Enable Word Wrap For All Files 1 Go to File > Preferences > Setting (Windows) or Code > Preferences > Settings (macOS). 2 Type word wrap in the search field and you will see the search results immediately. 3 Select on from the drop-down. More ...
In this snippet, we’re going to demonstrate how you can disable word wrapping in HTML. Actually, this can be done with a few steps using some CSS properties. To prevent the text from wrapping, you can use the CSS white-space property with the “nowrap” or “pre” value. In this snippet, you can see examples with both of them.
How to: Manage word wrap in the editor. You can set and clear the Word wrap option. When this option is set, the portion of a long line that extends beyond the current width of the Code Editor window is displayed on the next line.
which means, out of the box, word wrapping is enabled for markdown. When opening a file that is dominated by long lines, VSCode will also word wrap. e.g. try opening jquery-3.2.1.min. In such cases we show a button at the top of the editor: Now, all of that is the default, out-of-the-box behaviour.
Explained here Language-specific editor settings but specifically:
editor.wordWrapColumn
. Lines will wrap at the minimum of viewport and editor.wordWrapColumn
Example:
...
"editor.wordWrapColumn": 200,
"[typescript]": {
"editor.tabSize": 2,
"editor.wordWrap": "off",
},
"[plaintext]": {
"editor.wordWrap": "bounded",
},
...
Looks like VSCode allows for this. You can tweak it as you prefer for each file type.
However note that there have been reports of it not working for markdown files. I guess it is something still being tweaked.
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