0
votes

Tell me how to turn off the wrapping of closing tags in VSCode?

working with vue - set the settings:

Editor: Word Wrap Column = 300

Vetur ›Format› Default Formatter: HTML - specified prettyhtml

in its settings also indicated

"prettyhtml": {
    "printWidth": 300,
    "singleQuote": false,
    "wrapAttributes": false,
    "sortAttributes": false
}

I want it to be

<div class="col-10">
  <input
    v-model="form.shortName"
    type="text"
    class="form-control"
    placeholder="Краткое наименование"
    name="shortName"
    :class="{ 'is-invalid': typesubmit && $v.form.shortName.$error }"/>
  <div v-if="typesubmit && $v.form.shortName.$error" class="invalid-feedback">
    <span v-if="!$v.form.shortName.required">Обязательное поле.</span>
  </div>
</div>

and the editor after formatting gives

        <div class="col-10">
          <input
            v-model="form.shortName"
            type="text"
            class="form-control"
            placeholder="Краткое наименование"
            name="shortName"
            :class="{
              'is-invalid': typesubmit && $v.form.shortName.$error
            }"
          />
          <div
            v-if="typesubmit && $v.form.shortName.$error"
            class="invalid-feedback"
          >
            <span v-if="!$v.form.shortName.required"
              >Обязательное поле.</span
            >
          </div>
        </div>

basically looking for how to turn off sign wrap ">"

1

1 Answers

0
votes

You can try setting:

"html.format.wrapAttributes": "auto"

"auto" means:

Wrap attributes only when line length is exceeded.

The line length can be defined through a different parameter like:

// Max characters per line
"html.format.wrapLineLength": 120

Also, try modifying this parameter if the above params do not give the desired results.

"prettier.printWidth": 300