Skip to content

Instantly share code, notes, and snippets.

@ninest
Created June 26, 2020 07:45
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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"
}
]
}
@jch254
Copy link

jch254 commented Jul 3, 2020

Brilliant thanks so much for the blog post on Using VScode for Sonic Pi, perfect timing :D

@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