numbat icon indicating copy to clipboard operation
numbat copied to clipboard

Flexibility in Units

Open KevinSource0 opened this issue 10 months ago • 2 comments

Currently, square feet to square meters conversion is supported, but requires a specific syntax to work, like:

5 ft^2 to m^2

However, Square feet (sqft) and square meters (m2) are more widely used, casual, and easier to type compared to formal notations like ft^2 or m^2. Could Numbat be more flexible in accepting different units, making it more user-friendly and accessible, particularly for everyday users?

Sample usage:

5 sqft to m2
6 m2 to sqft

KevinSource0 avatar Feb 17 '25 03:02 KevinSource0

This could easily be done I think, but I'm unsure if it should be part of the prelude.
Some are good, but I personally don't like the idea of m2 being the same as m^2, especially as it could set expectations for how <identifier>2 works in general.

Maybe it could be a separate module so it can be chosen by the user.

Goju-Ryu avatar Feb 28 '25 15:02 Goju-Ryu

This could easily be done I think, but I'm unsure if it should be part of the prelude.

I fully agree. We have user-customizable units in Numbat such that users can configure something like this if they want to.

@KevinSource0 you could add

unit sqft = ft^2
unit m2 = m^2

to your init.nbt, if you use the CLI version.

Some are good, but I personally don't like the idea of m2 being the same as m^2, especially as it could set expectations for how <identifier>2 works in general.

Fully agreed. See also the "strict syntax" design goal in the README.

sharkdp avatar Mar 01 '25 19:03 sharkdp