Last active
August 25, 2025 09:47
-
-
Save 1f604/a01668ec2be363fa1b783dd0204ead22 to your computer and use it in GitHub Desktop.
VSCode how to create keyboard shortcut to wrap text in a custom tag
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://stackoverflow.com/questions/40155875/how-can-i-do-tag-wrapping-in-visual-studio-code | |
// keybindings.json | |
// Place your key bindings in this file to override the defaults | |
[ | |
{ | |
"key": "ctrl+shift+9", | |
"command": "editor.emmet.action.wrapWithAbbreviation", | |
"when": "editorHasSelection", | |
"args": { | |
"abbreviation": "span", | |
}, | |
}, | |
{ | |
"key": "ctrl+shift+9", | |
"command": "editor.action.insertSnippet", | |
"when": "editorTextFocus", | |
"args": { | |
"snippet": "\");\n$0" | |
}, | |
} | |
] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment