flasek flaskowy
flasek flaskowy

Reputation: 23

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.

Upvotes: 2

Views: 2056

Answers (5)

Anderson Rodrigues
Anderson Rodrigues

Reputation: 633

You can manually enter Ctrl + Shift + P, find the select "View: Toggle Word Wrap". This work for me.

Upvotes: 1

Mark.Fang
Mark.Fang

Reputation: 344

Click setting icon, then filter setting by 'line length' keyword. Change Line lenght property for your language.

Click setting icon, then filter setting by 'line length' keyword. Change Line lenght property for your language

Upvotes: 1

sankalpa isurukala
sankalpa isurukala

Reputation: 1

Remove (uninstall) Prettier - Code Formatter extension. It's working for me.

Upvotes: 0

MingJie-MSFT
MingJie-MSFT

Reputation: 9209

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

Upvotes: 0

Matteo Zanoni
Matteo Zanoni

Reputation: 4142

In VsCode settings set editor.formatOnSave to false

Upvotes: 5

Related Questions