joshpeng / Sublime-Babel-VSCode

Sublime Text's babel-sublime grammar in VS Code.
MIT License
49 stars 16 forks source link

Comenting JSX #9

Closed xDae closed 7 years ago

xDae commented 7 years ago
captura de pantalla 2017-02-13 a las 13 13 50

comenting JSX manually is a pain 😅

joshpeng commented 7 years ago

Commenting is done by VSC directly, not this grammar per se.

You can select the lines you want and press Ctrl+/ to comment them out in one shot. Alternatively, you can also set a block comment hot key. I have mine set to Ctrl+Shift+/

{ "key": "ctrl+shift+/",           "command": "editor.action.blockComment",
                                     "when": "editorTextFocus && !editorReadonly" }

If you are referring to something else, can you please clarify? Thanks.

xDae commented 7 years ago

i meant, when i comment the code with the keys, is wrong inside JSX syntax

now:

captura de pantalla 2017-02-15 a las 9 34 03

correct:

captura de pantalla 2017-02-15 a las 9 35 48
joshpeng commented 7 years ago

Unfortunately that doesn't seem to be something that can be changed with grammar in VS Code. The commenting is handled outside of the grammar in language-configuration.json, but that has no concept of context.