Skip to content

Instantly share code, notes, and snippets.

@ninest
Created June 26, 2020 07:45
Show Gist options
  • Save ninest/da9a240a33ac80f82ff95a4c39c2d31f to your computer and use it in GitHub Desktop.
Save ninest/da9a240a33ac80f82ff95a4c39c2d31f to your computer and use it in GitHub Desktop.
Sonic Pi in VSCode
// Place your key bindings in this file to override the defaults
[
// ..
// all your other keybindings
// ...
// for sonic pi
{
"key": "ctrl+alt+s",
"command": "workbench.action.tasks.runTask",
"args": "sp-run",
"when": "editorLangId == ruby" // limit these keybindings to work in ruby files
},
{
"key": "ctrl+alt+d",
"command": "workbench.action.tasks.runTask",
"args": "sp-stop",
"when": "editorLangId == ruby"
}
]
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
// ...
// all your other tasks
// ...
{
"label": "sp-run",
"type": "shell",
"command": "cat ${file} | sonic_pi"
},
{
"label": "sp-stop",
"type": "shell",
"command": "sonic_pi stop"
}
]
}
@ninest
Copy link
Author

ninest commented Jul 3, 2020

@jch254 Glad you found it useful 😁

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