-
-
Notifications
You must be signed in to change notification settings - Fork 942
snippits? #587
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I haven't decided whether to add snippets to v2.6 or keep them in development yet :-) |
No docs yet - I'm not officially supporting this implementation at this stage. However to play with it now (with the caveat that it all may drastically change) you just need to create a file with the contents of your snippet with an
At the top of the file you'll need to put some metadata telling Sonic Pi when to trigger your snippet and where to leave the cursor. Here's an example of a complete snippet (from here: https://github.com/samaaron/sonic-pi/blob/master/etc/snippets/fx/fx_reverb.sps):
Let me know if you have any further questions. I plan on adding more sophistication to this system once I can figure out how to implement it :-) |
If at some point you decide to offer this as an official feature, it would be very convenient, if the completion functionality knew of the snippets (quite hard to remember all the identifiers once you have a whole collection of snippets). |
I’m definitely going to support snippets in the future. The real question is exactly how. I’m currently experimenting with different approaches and the secret version in Sonic Pi is one of them. This is a typical development approach for me for Sonic Pi - I let an idea bake over a number of months (even for a year) whilst constantly using/refining and occasionally completely changing it. Eventually I end up with something much more polished and usable than the first implementation I came up with :-) Sam
|
Yes, I appreciate the results of this approach very much. I also Having said that, if Sonic Pi users somehow discover 'secret functions' I saw a presentation of Xavier and wondered where he get's the code Thanks for your comments on that! Martin Am 30.04.2016 um 22:55 schrieb Sam Aaron:
|
I love the snippets feature in it's current state, it's very helpful. But I understand that Sam would like to give it a little more love. @samaaron If You thinking on how snippets would be even better than now then I'd suggest to take a look at Sublime Text Snippets or Intellij IDEA Live Template. I think both systems are very nice. I use them a lot. Here's a 3 min video that's show how snippets works in Sublime Text: https://www.youtube.com/watch?v=DlE4cupYOys And here's an article on it: http://sublimetext.info/docs/en/extensibility/snippets.html |
I've made a WIP PR, well more Proof of Concept of how built in & user Snippets could work. #1821 |
Will there be docs for snippits added in this release, or is it still under development?
at present
do
ll
fx r
fx b
all work (although two sps files for fx r currently in snippets folder)
and of course you can add your own (although not perhaps for most users)
The text was updated successfully, but these errors were encountered: