glushchenko / fsnotes

Notes manager for macOS/iOS
https://fsnot.es
MIT License
6.37k stars 468 forks source link

Added support for variables in Soulver #1697

Closed filipstachura closed 7 months ago

filipstachura commented 7 months ago

Hi @glushchenko! Thank you for your amazing work on this project 🙌

I'm not sure about contribution guidelines, but I'd like to propose this change to Soulver functionality. This change allows to use variables through Soulver expressions, so one can write:

{trip_total = 200usd + 300euro + 100pln in usd to 2 dp}
{people = 4}
{cost_per_person = trip_total / people to 2 dp}

and get:

$543,18
4
$135,80

This change is not very invasive so I think you can consider this as a default. If you think otherwise I'd by happy to move it to the settings. Let me know what you think!