Stemming from a GMC forum topic (link here) I created this small, experimental utility in Python (converted to an executable) some months ago. It allows you to define unlimited snippets (by editing a JSON file and optionally a Python script for advanced use) that can be used in Gamemaker (or elsewhere) to insert arbitrary text. It supports:
- Simple snippets - for example, type something like
:hiand it gets replaced byHello World!. These can be multiline, and are similar to Gamemaker's own snippets. - Snippets with parameters - for example, type something like
:methodand a form will pop up that asks you for a method name and a parameter name, then replaces it withmy_function(my_param)for example. The parameters are configurable, the form gets automatically rendered. - Custom snippets - for example, type something like
:calc, write an arbitrary calculation on the form, such as1 + (3/5), then call a custom Python function that processes those parameters and returns a result string, then substitutes your input (in this case with1.6).
Experimental but useful I think, let me know your thoughts, suggestions or bugs.
Current version: 0.21
Provided as-is. Use at your own risk.
Short demo video: https://www.youtube.com/watch?v=EsWTEzGSqOA
Page with documentation and download: https://manta-ray.itch.io/gmsnip