19

I have the following settings in VS code to disable word wrap

 "editor.wordWrap": "off", "editor.wordWrapColumn": -1 

Word wrap is still not turned off. This makes VS Code really unfriendly to use on my laptop with a small screen.

Is there some additional setting I can use?

I am on 1.17.1.

2
  • 13
    Any luck with ALT + Z to toggle this? Commented Oct 12, 2017 at 19:13
  • 5
    Yes, that works. Thanks. But I want to persist word wrap off as a setting if possible. Commented Oct 12, 2017 at 19:15

3 Answers 3

17

Are you using markdown? vscode changes some default settings:

"[markdown]": { "editor.wordWrap": "off" } 
Sign up to request clarification or add additional context in comments.

1 Comment

I think this is a problem across all file types. I was working in a HTML file when typing up my question.
2

On version 1.17.1 try changing default settings (not overriding with user settings) to:

"editor.wordWrap": "off", "editor.wordWrapColumn": 80, 

That works for me. And you can also edit the user settings (via Code or directly editing settings.json file on AppData\Roaming\Code\User (at my computer) by just adding the wordWrap line.

After changing settings always close and reopen both VS Code and the file (as it saves it opened).

Comments

1

If you are dealing with a file that has very long lines, this could be the issue you are facing.

https://github.com/microsoft/vscode/issues/21124

It seems it is made that way by design to prevent slow load times. It can be manually overridden with ALT + Z shortcut while the file is opened. After that, it reverts to the old setting and you have to do it again.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.