-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
Sorry did not know where to put this, but I wanted to share this in case anyone else needed it.
vsCode keybindings, to change as needed.
For commenting inside <style jsx> tags.
vscode inside jsx does {/* Your Comment or code /}
The code below, will do CSS comments / Your comment or code */
Thanks again for solid-styled, as I use it all the time.
// Place your key bindings in this file to override the defaults
[
{
// Toggle for single line at cursor - no selection needed.
"key": "ctrl+shift+/",
"command": "runCommands",
"args": {
"commands": [
"cursorEnd", // so cursor stays on same line
"cursorHomeSelect",
{
"command": "editor.action.insertSnippet",
"args": {
// I failed because I used 3 not 4 - crazy regex groups.
"snippet": "${TM_SELECTED_TEXT/(\\/\\* )(.+)( \\*\\/)|(.*)/$2${4:+/* }$4${4:+ */}/}"
}
}
]
},
// "when": "editorLangId == javascript || editorLangId == typescript"
"when": "resourceExtname =~ /\\.(js|ts|r)(?!on)/"
},
{
// Toggle for multi-line, pre-selected block /* ... */
"key": "ctrl+shift+oem_7",
"command": "editor.action.insertSnippet",
"args": {
"snippet": "${TM_SELECTED_TEXT/(\\/\\*)([\\s\\S]*?)(\\*\\/)|([\\s\\S]+)/$2${4:+/* }$4${4:+ */}/}"
},
"when": "resourceExtname =~ /\\.(js|ts|r)(?!on)/"
}
]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels