Note
Because this plugin uses the new Script Editor API beta feature, it will not work if you don’t have said feature enabled. Since it’s in beta, this also means that Roblox may make code-breaking changes but I’m hoping that that’s not happening anytime soon. (lol)
To enable it, go to:
File > Beta Features > Enable Script Editor API
Restart studio for changes to take effect.
Other snippet plugins have been made in the past, but since the Script Editor API wasn’t available, they all reset the cursor position back to the start. This plugin lets you continue coding without having to go back to where you were every time.
This is why Snips was created: it’s a simple tool that lets you use code snippets with ease, but it also has lots of customisation to offer.
Click here, and press install. The plugin is now yours!
It comes with a few snippets by default, such as:
!gs(x) ==> local x = game:GetService(x)
!hdr() -- creates header comment, too long to show here
!class(class_name) -- adds class boilerplate, too long to show here
The snippet syntax works similarly to normal functions: you have the function name, parentheses, as well as arguments inside those parentheses.
Let’s test it out by opening a Script:
note: Press spacebar after entering the snippet for it to be replaced.
Click on Edit Snips in the plugin toolbar.
The Snips Editor should now be open. At the top, you’ll see a list of instructions explaining how to make your own snippets. Follow these instructions and you’ll be set!
If the instructions are a bit confusing(I’m not the best when it comes to explaining things), you can take a look at the built-in snippets and you should have a good idea of how they’re done.
Feel free to send any of your own snippets down here, if you believe they may be useful to anyone else.
Since this plugin is fairly new, it may contain lots of bugs. Feel free to send feedback by either sending me a DM or submitting a reply to this topic.
Thanks for reading!