0

I need to disable this auto line break my code in Java VS CODE Formatter

It's wrong

enter image description here

Expected:

enter image description here

Amala Amala
  • 295
  • 1
  • 2
  • 15
  • 2
    Does this answer your question? [How can I switch word wrap on and off in Visual Studio Code?](https://stackoverflow.com/questions/31025502/how-can-i-switch-word-wrap-on-and-off-in-visual-studio-code) – Ruli Dec 11 '20 at 07:22
  • I was annoyed that the Java Language extension for vscode was breaking up commented code, so I increased the default column line length from 80 to 200 in java-formatter.xml `` – alv May 20 '22 at 06:08

1 Answers1

0

This is because you open the wordWrap, but your current code length exceeds the max-length which has been set by default.

There're two solutions to your question, writing it in Settings.json:

1.Turn off the wordWrap:

    "editor.wordWrap":"off",

2.Still keep wordWrap on but changing the code's max-length:

   "editor.wordWrap": "wordWrapColumn",
   "editor.wordWrapColumn":200,
Molly Wang-MSFT
  • 7,943
  • 2
  • 9
  • 22