Skip to content

Instantly share code, notes, and snippets.

@ronalson
Created August 12, 2018 02:06
Show Gist options
  • Save ronalson/ec288bbaad0a72e9305dabfc8e4ed3be to your computer and use it in GitHub Desktop.
Save ronalson/ec288bbaad0a72e9305dabfc8e4ed3be to your computer and use it in GitHub Desktop.
Autoclosing Quotes and Backticks on VSCode
[
{
// wrap a selection with double quotes (")
"key": "shift+'",
"command": "editor.action.insertSnippet",
"when": "editorHasSelection && editorTextFocus",
"args": {
"snippet": "\"${TM_SELECTED_TEXT}$1"
}
},
{
// wrap a selection with single quotes (')
"key": "alt+'",
"command": "editor.action.insertSnippet",
"when": "editorHasSelection && editorTextFocus",
"args": {
"snippet": "'${TM_SELECTED_TEXT}$1'"
}
},
{
// wrap a selection with back ticks (`)
"key": "alt+`",
"command": "editor.action.insertSnippet",
"when": "editorHasSelection && editorTextFocus",
"args": {
"snippet": "`${TM_SELECTED_TEXT}$1"
}
}
]
@ronalson
Copy link
Author

thanks @swill for helping me out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment