Sick of seeing numbers like 123456789?
Want to see numbers like 123,456,789?
Use this.
This package uses the ‘display text property and font-lock to show the number separations. The underlying text remains unchanged.
(require 'number-separator)
(number-separator-mode)
or
(use-package number-separator
:custom
(number-separator ",")
(number-separator-interval 3)
(number-separator-ignore-threshold 4)
(number-separator-decimal-char ".")
:config
(number-separator-mode))
Or if you are European:
(use-package number-separator
:custom
(number-separator ".")
(number-separator-interval 3)
(number-separator-ignore-threshold 4)
(number-separator-decimal-char ",")
:config
(number-separator-mode))
You can customize the following variables:
number-separator
- character used to separate groups of integer numbers. Default:
“,”
number-separator-interval
- how many numbers in each group? Default:
3
. number-separator-decimal-char
- how do you separate integers from fractionals. Default
“.”
number-separator-ignore-threshold
- don’t begin separating numbers until they have more than this many digits. Default
4
(i.e., to avoid separating four digit years)