Created
May 19, 2017 15:21
-
-
Save lipkau/25194fb72d732864997a78ec4e82b042 to your computer and use it in GitHub Desktop.
Insert Snippet around selection with keybinding #vscode #sample
This file contains 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
{ | |
"make_strong": { | |
"prefix": "strong", | |
"body": [ | |
"<strong>$TM_SELECTED_TEXT${1}</strong>${0}" | |
], | |
"description": "Encloses selected text in <strong></strong> tags" | |
}, | |
"make_italic": { | |
"prefix": "italic", | |
"body": [ | |
"<em>$TM_SELECTED_TEXT${1}</em>${0}" | |
], | |
"description": "Encloses selected text in <em></em> tags" | |
} | |
} |
This file contains 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
[ | |
{ | |
"key": "ctrl+i", | |
"command": "editor.action.insertSnippet", | |
"args": { "name": "make_italic" }, | |
"when": "editorHasSelection && editorLangId == html" | |
}, | |
{ | |
"key": "ctrl+b", | |
"command": "editor.action.insertSnippet", | |
"args": { "name": "make_strong" }, | |
"when": "editorHasSelection && editorLangId == html" | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment