I'm recognizing some issues in visual studio code when i want to comment some html code lines. When i press the shortcut ctrl+k ctrl+c
, it creates the tags <!--
and -->
before what i want, but the colors of the font don't become as they should be. The code lines after the comment, become in a wrong color like my comment isn't comment while all the remaining code is. The tags <!--
and -->
take a red colour like they are written wrong.
Asked
Active
Viewed 49 times
-1

rioV8
- 24,506
- 3
- 32
- 49
-
I using "ctrl + /" shortcut. May be you can find solutions here https://stackoverflow.com/questions/37312056/visual-studio-code-comment-in-html-files – Temka Mar 20 '23 at 08:13
-
1Are you using Visual Studio Code or Visual Studio? You mention both, but these are two completely different products. – Peter Macej Mar 20 '23 at 08:53
-
`ctrl+k ctrl+c` put what is selected in HTML comment delimiters – rioV8 Mar 20 '23 at 09:19
-
Add a screenshot of the before and after, and a code block to help people copy-paste to try to reproduce the issue. – starball Mar 20 '23 at 18:03
-
I have VISUAL STUDIO CODE. These are the shortcuts i've put: [shortcuts][1]. Now I show you the code before and after pressing ctrl + E: [before][2] [ctrl+E][3][ctrl+7][4]This is the code: [1]: https://i.stack.imgur.com/ChmKP.png [2]: https://i.stack.imgur.com/wfi7U.png [3]: https://i.stack.imgur.com/PElyv.png [4]: https://i.stack.imgur.com/RLbLp.png – Francesco Duluta Mar 21 '23 at 12:05
1 Answers
-1
I have VISUAL STUDIO CODE. These are the shortcuts i've put: shortcuts. Now I show you the code before and after pressing ctrl + E: before ctrl+Ectrl+7This is the code:
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css"
<!-- rel="stylesheet" -->
integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD"
crossorigin="anonymous"
/>

Roshin Raphel
- 2,612
- 4
- 22
- 40