numbat
numbat copied to clipboard
Formatting integer output without underscores
>>> 16!
16!
= 20_922_789_888_000
Is it possible to make numbat not format integer output with underscores? This can make it difficult to copy/paste the numbers to other tools.
I have looked through the documentation and code both, it does not appear to currently be an option. However from what I can tell, it doesn't look too difficult to implement as a configuration option, so I wouldn't rule out the possibility of it being possible in the future.
One hack is to format it as a string:
>>> let n = 16!
>>> "{n:f}"
= "20922789888000" [String]
You could add a function plain (or similar) to your init.nbt like this:
fn plain(n: Scalar) -> String = "{n:f}"
and then you could use it like this:
>>> 16! -> plain
= "20922789888000" [String]
Also related: https://github.com/sharkdp/numbat/issues/394