WeakAuras

WeakAuras

206M Downloads

Default Code Snippets

oratory opened this issue ยท 3 comments

commented

Is your feature request related to a problem? Please describe.
When I open a custom function editor I'm given a big box with no direction.

Describe the solution you'd like
How about when opening an editor with no content, drop in some sort of simple default code snippet to get started?
Example:

function()
  -- your code here

  -- return true to enable the trigger
  return true
end

Describe alternatives you've considered
N/A

Additional context
Add in a simple throttle snippet if every frame is selected!

commented

I had a similar impetus to create https://wago.io/AnnotatedCodeBlocks and I guess the "help" links were added to similarly address the problem.

I like the idea of having some basic outline whenever you open a custom code block though. For experienced users it would still save a bit of typing and could be very useful for people starting out.

commented

@asaka-wa: Can we use your code snippets?

commented

Yes, of course. Use/edit as you need.