VS Code Tips - Fix Multiline Comments in CSS/HTML

VideoZoran Jambor

A quick tip showing how to fix broken block comments behavior in Visual Studio Code by utilizing the built-in Emmet toolkit.

A quick tip showing how to fix broken block comments behavior in Visual Studio Code by utilizing the built-in Emmet toolkit.

BETTER When Expression: editorTextFocus && !editorReadonly && (resourceLangId == 'html' || resourceLangId == 'css')

When Expression shown in the video: editorTextFocus && !editorReadonly && (resourceExtname == '.css' || resourceExtname == '.html')

Note

Jayden Pearse noted in the comments that you can use "resourceLangId" instead of "resourceExtname," which will also work on files without an extension, as long as the correct language (CSS or HTML) is detected or set manually.

Mastering Linting

Mastering Linting

Get proficient with the best linting tools, Prettier & Stylelint.

Enroll Now »
CSS Weekly YouTube Channel

CSS Weekly YouTube Channel

Weekly hands-on tutorials, tips, tools, news, and more — everything related to CSS and front-end development, created by Zoran Jambor.

Subscribe Today »