'Vscode: How to disable auto breaking too long lines?
I have line of code:
thread = ThreadModel.objects.filter(user=request.user, receiver=receiver)[0]
After ctrl + s, Vscode correcting my line and I got:
thread = ThreadModel.objects.filter(
user=request.user, receiver=receiver)[0]
I don't want that. How can I turn off it?
I have read settings and I didn't find solution.
Solution 1:[1]
In VsCode settings set editor.formatOnSave to false
Solution 2:[2]
This is because your setting.json is set to automatically format the document when saving. You can type Ctrl + P to open setting.json.Set the line "editor.formatOnSave": false,However, you should note that if you do this, it will not be formatted automatically when you save. You can manually enter Ctrl + Shift + P ,find the select"Format Document".
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Matteo Zanoni |
| Solution 2 | MingJie-MSFT |
