LiamRiddell/obsidian-solve

[Feature Request] Sum up previous lines

Closed

#49 opened on Mar 2, 2024

 (2 comments) (4 reactions) (0 assignees)TypeScript (4 forks)auto 404
enhancementhelp wanted

Repository metrics

Stars
 (126 stars)
PR merge metrics
 (Avg merge 59m) (3 merged PRs in 30d)

Description

Is your feature request related to a problem? Please describe. Summing up a couple of numbers is what I mostly need a calculator for, and I suspect I'm not alone. The Mac apps Soulver, Numi and also the Numerals plugin have a "magic variable" that sums up all the above lines. (Up to an empty line or another kind of separator like a ## Headline.) But I can't do this very easily in Solve. (At least I don't know how?)

Describe the solution you'd like A syntax something like this. (Just as an example: two lines declare variables, one doesn't, one has a calculation.)

Apples = 10 Oranges = 20 10 1 + 1 @sum = 42

(Github makes links out of "@", that's not the intention :-)

Describe alternatives you've considered Could also be something else than "@sum" or "@total", if those seem like they would conflict with something. (":sum" or ":total" ?)

Contributor guide