Comment shortcut not using correct comment syntax
See original GitHub issueInitial checklist
- I read the support docs
- I read the contributing guide
- I agree to follow the code of conduct
- I searched issues and couldn’t find anything (or linked relevant results below)
Affected packages and versions
mdxv2
Link to runnable example
No response
Steps to reproduce
Inside VSCode open a .mdx
file and hightlight a line e.g.
# Some cool heading
Press <kbd>CMD</kbd> + <kbd>/</kbd> on macOS or <kbd>Ctrl</kbd> + <kbd>/</kbd>. Observe the line changes to:
<!-- # Some cool heading -->
Expected behavior
MDX requires using JS comment syntax not HTML e.g.
{/* # Some cool heading */}
Actual behavior
Wrong syntax is used.
Runtime
Node v16
Package manager
npm v6
OS
macOS
Build and bundle tools
webpack, Next.js
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:10 (7 by maintainers)
Top Results From Across the Web
Comment Shortcut Not Working - Visual Studio Feedback
When attempting to comment out a line of code, using CTRL + '/' , about 20 clicks of the Slash are required to...
Read more >VS 2019 - Toggle line comment shortcut not working?
For the default keyboard mapping scheme, Ctrl + / is assigned to EditorContextMenus.CodeWindow.GenerateDocumentationComments .
Read more >Comment with Line Comment does not work
It works for a line and a text block. Uncomment with Ctrl + numeric pad /. Ctlr + Shift + numeric pad /...
Read more >How to Comment in VS Code - The VSCode Comment Shortcut
Changing the comment key binds in VS Code · 1. Open the command input. Windows: Ctrl + Shift + P Mac: Command +...
Read more >Visual Studio Comment Shortcuts: Efficiency Tips
The most basic shortcut for creating a comment is Ctrl+K, Ctrl+C. This, of course, is the default shortcut for Edit.CommentSelection, which can ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
no helpful addition, just wondering how https://github.com/mdx-js/vscode-mdx/commit/b4a5968213d83ccca3dd96d0fd2ce3aaba8ab505#diff-9e025f93877bc7deb06b843385febc8b1cbd364d60070d58f1da1e9dab0fdfc5R3 apparently didn’t do it 😮
@grahampcharles Thanks.
I just forgot
mdx@v2
doesn’t use HTML style comments anymore.