Skip to content

Instantly share code, notes, and snippets.

@elshanx
Created March 8, 2021 16:12
Show Gist options
  • Save elshanx/b616d985e37861fb50949ef43ebc238f to your computer and use it in GitHub Desktop.
Save elshanx/b616d985e37861fb50949ef43ebc238f to your computer and use it in GitHub Desktop.
add console log to vscode key bindings
File > Preferences > Keyboard Shortcuts
Above the search bar on the right you'll see a icon that when you hover over says "Open Keyboard Shortcuts (JSON)", click on it
Add this to the JSON settings:
{
"key": "alt+a",
"command": "editor.action.insertSnippet",
"when": "editorTextFocus",
"args": {
"snippet": "console.log('${TM_SELECTED_TEXT}$1')$2"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment