Skip to content

Instantly share code, notes, and snippets.

@solarkraft
Last active November 11, 2022 02:40
Show Gist options
  • Save solarkraft/6af26e308fec739950464474fb500368 to your computer and use it in GitHub Desktop.
Save solarkraft/6af26e308fec739950464474fb500368 to your computer and use it in GitHub Desktop.
VSCode: Run current file/selected text
{
// You can bind "Rerun Last Task" to something convenient like cmd+R
"version": "2.0.0",
"tasks": [
{
"label": "Run current file",
"type": "shell",
"command": "echo Running from file: \"$(cat ${file})\"",
},
{
"label": "Run selected text",
"type": "shell",
"command": "echo",
"args": [
"Run text ...",
"${selectedText}"
],
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment