Code Function Writers Rejoice!
The devs have granted us a gift and introduced newlines in formula functions! Although I believe this is just the first step in a number of necessary features for writing complex formulas, it is certainly a welcomed one!
How do I do it?? Just use SHIFT + ENTER while writing a formula.
Why would I need such a thing?? Coda is designed to allow complex environments designed by their users. The more complicated the environments, the more complex the formulas. The real issue isn’t really with writing formulas (although still complicated…), it has more to do with maintenance. When coming back to a complex formula written months, weeks, or even just days ago, it can be hard to remember what it does, and particularly hard to remember how it does it. Also useful, is to note why you wrote it…
Here is an example of using newlines to make things clearer:
PS - Yes, I stitched together multiple photos to make the “after” photo… Give me larger edit areas!
Things that are still necessary to make the formula writing and maintenance process manageable:
- Inline comments # Because of course we do!
- Custom (larger…?) formula-writing box… It is entirely too small right now
- (Doesn’t my stitched-together photo above look so pretty?)
- Longer variable cells so I can see the names of my variables!
- (See: "Var - Console - Toggle Pe…? above…)
Thanks for the constant improvements!