Last active
November 11, 2022 02:40
-
-
Save solarkraft/6af26e308fec739950464474fb500368 to your computer and use it in GitHub Desktop.
VSCode: Run current file/selected text
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
{ | |
// 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