Use nn* in the Find Widget (Ctrl+H) with the regex option (.*) icon enabled, replace with n. Replace All.
or better change this setting:
// List of tags, comma separated, that should have an extra newline before them. `null` defaults to `"head, body, /html"`.
`HTML > Format: Extra Liners`
In your settings.json:
"html.format.extraLiners": "" // just leave empty
Now when you format the html file those empty lines above head/body/html should be removed (select all and Command Palette: Format Selection).
3
Answers
Shift-ArrowRight
as many times till cursor at pos 1 selecting all newlines till next textCtrl+Shift+L
to select all similar partsArrowRight
Backspace
as much times as neededEsc
to leave multi cursorAccording to your screenshot, you can try to reduce the line height to reduce the gaps between two successive lines.
And done.
Also you could try reducing your font size which would automatically decrease the line height thus reducing gaps in between successive lines.
Use
nn*
in the Find Widget (Ctrl+H) with the regex option (.*
) icon enabled, replace withn
.Replace All.
or better change this setting:
In your
settings.json
:Now when you format the html file those empty lines above
head/body/html
should be removed (select all and Command Palette:Format Selection
).