htmlcommentsvisual-studio-codekey-bindingscode-editor

Visual studio code comment in HTML files


I am trying Visual Studio Code lately and i've noticed that when i try to add a line comment in an HTML file (using Ctrl+/ or Ctrl+K Ctrl+C) instead of this: <!-- -->, i get this {# #}.

In JS or CSS files the key bindings work just fine and produce the expected result.

So how can i get the proper type of comments in HTML files?


Solution

  • Finally i found what the problem was. I had installed the twig plugin (for the Twig php template engine) and that was causing the comments issue.