7
7
7GIT2020-11-05 14:22:04
Visual Studio Code
7GIT, 2020-11-05 14:22:04

How to disable line wrapping when formatting HTML in VSCODE?

How to disable line wrapping when formatting HTML in VSCODE?
Some tags wrap attributes and classes on a new line.

Picture for clarity
5fa3de3ccad6b054185792.png

My settings.json
{
  "update.enableWindowsBackgroundUpdates": false,
  "update.mode": "none",
  "editor.formatOnSave": true,
  "editor.formatOnType": true,
  "[html]": {
    "editor.defaultFormatter": "vscode.html-language-features"
  },
  "[jsonc]": {
    "editor.defaultFormatter": "vscode.json-language-features"
  },
  "[javascript]": {
    "editor.defaultFormatter": "vscode.typescript-language-features"
  },
  "[json]": {
    "editor.defaultFormatter": "vscode.json-language-features"
  },
  "workbench.startupEditor": "newUntitledFile",
  "editor.renderControlCharacters": true,
  "editor.renderWhitespace": "all",
  "files.autoSave": "onWindowChange",
  "editor.tabSize": 3,
  "editor.insertSpaces": false,
  "editor.detectIndentation": false,
  "editor.hover.enabled": false,
  "editor.mouseWheelZoom": true,
  "workbench.editor.closeEmptyGroups": false,
  "vscodeGoogleTranslate.preferredLanguage": "Russian",
  "vscodeGoogleTranslate.HoverTranslations": true,
  "editor.renameOnType": true,
  "workbench.colorTheme": "One Dark Pro",
  "liveServer.settings.donotShowInfoMsg": true,
  "livePugCompiler.savePath": "/html",
  "liveServer.settings.donotVerifyTags": true,
  "liveSassCompile.settings.formats": [
    {
      "extensionName": ".css",
      "format": "expanded",
      "savePath": "css"
    }
  ],
  "liveSassCompile.settings.excludeList": [
    "**/node_modules/**",
    ".vscode/**",
    ".git/**"
  ],
  "liveSassCompile.settings.generateMap": false,
  "liveSassCompile.settings.autoprefix": [
    "> 1%",
    "last 10 versions"
  ],
  "emmet.triggerExpansionOnTab": true,
  "editor.wordWrap": "on"
}


Thanks to all!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yuri, 2020-11-05
@7GIT

html.format.wrapLineLength in settings set to 0

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question