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.

CSS Stickers

CSS Stickers

A set of beautiful, cute, and funny CSS stickers to showcase your love for CSS.

Get Your Set Today »
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 »