9

When I comment HTML files, VSCode wraps my selection and puts a single <!-- --> tag around the whole selection.

How can I change it so that instead it comments every single line individually? (like e.g. in WebStorm)

Thanks!

Audwin Oyong
  • 2,247
  • 3
  • 15
  • 32
Han Che
  • 8,239
  • 19
  • 70
  • 116

3 Answers3

3

I made an extension that will do what you want: Toggle Comments.

Using this keybinding:

  {
    "key": "ctrl+alt+/",               // whatevefr keybinding you wish
    "command": "toggle-comments.toggleLineComments",
    "when": "editorTextFocus"
  }

html comment each line separately demo

Mark
  • 143,421
  • 24
  • 428
  • 436
1

Keyboard shortcut to comment multiple in Windows is 'Shift+Alt+A'.

Sannon Aragão
  • 331
  • 1
  • 4
  • 13
0

Use the keyboard shortcut:

ctrl + shift + /

Ebin Zacharias
  • 195
  • 1
  • 7