问题描述
谁能告诉我如何在 VSC 中注释 JSX 代码?
Can anyone tell me how to comment JSX code in VSC?
我查看了底部列出的文章,似乎没有一个给出具体解决方案,并且该票证似乎已关闭,声称已在VSC上正确解决了评论/取消评论功能.但是,按照建议尝试以下操作后,我仍然遇到问题:
I looked at the articles listed at the bottom, none of them seem to give a concrete solution, and the ticket appeared to have been closed, claiming that the commenting/uncommenting function has been properly resolved on VSC. However, I am still having troubles after trying out the followings as suggested:
- 在 VSC 上禁用 sublime-babel 扩展
- 将我的语言更新为 Javascript react
在用户设置中,添加以下内容:
- disable sublime-babel extension on VSC
- Update my language to Javascript react
In user setting, added the followings:
"emmet.syntaxProfiles": { "javascript": "jsx" },
"files.associations": {"*.js": "javascriptreact"},
任何线索将不胜感激.用尽所有招数.谢谢!
Any clue would be really appreciated. Exhaused all tricks. Thanks!
https://github.com/Microsoft/vscode/issues/6461
推荐答案
选择要评论的文本,然后按 Ctrl+K 和 Ctrl+C.
Select the text to be commented then press Ctrl+K and Ctrl+C.
这篇关于如何在 VSC 中注释/取消注释 jsx(使用键盘 `cmd/`)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!