Sonic Pi has an experimental, undocumented feature to support snippets, which autoexpand with the TAB key.
Here's the issue: sonic-pi-net/sonic-pi#587
Specifically, Sam's comment: sonic-pi-net/sonic-pi#587 (comment)
... [T]o 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 .sps extension in a directory somewhere on your machine. You might want to create a snippets directory for your own personal snippets. The name of the file doesn't matter. You then load all the snippets in a given directory with:
load_snippets("/path/to/snippets/dir")