Ctrl+/ putting html comments inside of script and style tags

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

In Cursor 1.7.38 if I type ctrl+/ inside of script or style tags in an HTML file, it comments out the code using HTML comments. In VS Code if I type ctrl+/ inside of script tags, it comments out the selected lines with // as expected. In style tags, VSCode generates /**/ comments as expected.

Steps to Reproduce

Create an HTML file with the following contents:

.foo { color: red; }

Highlight the lines of CSS and press ctrl+/
Highlight the lines of JavaScript and press ctrl+/

Observe that HTML-style comments are generated instead of CSS and JavaScript comments.

Expected Behavior

/**/ and // style comments should be generated appropriately

Screenshots / Screen Recordings

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.7.38 (system setup)
VSCode Version: 1.99.3
Commit: fe5d1728063e86edeeda5bebd2c8e14bf4d0f960
Date: 2025-10-06T18:18:58.523Z
Electron: 34.5.8
Chromium: 132.0.6834.210
Node.js: 20.19.1
V8: 13.2.152.41-electron.0
OS: Windows_NT x64 10.0.26200

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report. Are you using any HTML extensions? I can’t reproduce this. Here’s my HTML file in Cursor with the correct comments.

Thank you for the quick reply! Found the culprit per your question, I am using the “Salesforce Extension Pack” extension. When I deactivate that extension and restart Cursor, the comments work as they should. Feel free to close this one out, and thanks again! :slight_smile:

1 Like

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.