Home > Software design >  Vscode: How to disable auto breaking too long lines?
Vscode: How to disable auto breaking too long lines?

Time:03-18

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.

CodePudding user response:

In VsCode settings set editor.formatOnSave to false

CodePudding user response:

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".

  • Related