Search code examples
javavisual-studio-codeword-wrap

How do I auto skip a another line instead of word wrapping in vs code for java?


I enabled word wrap settings in vs code for java. I realized it don't actually skip a line:

This is happening.

But I want to all of them is a different line, and it will be saved that way:

that way.

Here is my word wrap settings:

Here is my word wrap settings.

And this is my settigns.json file:

{
"terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe",
"files.autoSave": "afterDelay",
"workbench.colorTheme": "One Dark Pro",
"python.pythonPath": "C:\\Users\\atleo\\AppData\\Local\\Programs\\Python\\Python39\\python.exe",
"workbench.startupEditor": "newUntitledFile",
"window.zoomLevel": 0,
"C_Cpp.updateChannel": "Insiders",
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"python.languageServer": "Pylance",
"[Log]": {

    "editor.wordWrap": "off"
},
"java.configuration.checkProjectSettingsExclusions": false,
"python.autoComplete.addBrackets": true,
"python.analysis.completeFunctionParens": true,
"workbench.editorAssociations": [
    {
        "viewType": "jupyter.notebook.ipynb",
        "filenamePattern": "*.ipynb"
    }
],
"editor.rulers": [
    { "column": 80,
    "color": "#307777"}
],
"kite.showWelcomeNotificationOnStartup": false,
"java.configuration.runtimes": [

],
"[java]": {

    "editor.suggest.snippetsPreventQuickSuggestions": false
},
"files.associations": {
    "*.java": "java"
},
"java.refactor.renameFromFileExplorer": "autoApply",
"git.autofetch": true,

"editor.wordWrap": "wordWrapColumn",
"[markdown]": {

    "editor.wordWrap": "on",
    "editor.quickSuggestions": true
},

}


Solution

  • This feature will be added in next update, which can Provide better format configuration experience.

    [UPDATE]

    With java extension latest release, you can achieve this feature from Command Palette then choose java: open java formatter settings with preview. Detailed information please view Java on Visual Studio Code Update – May 2021.