Skip to content

Automatically separate groups of three (or four) numbers with commas (or periods)

License

Notifications You must be signed in to change notification settings

swarnendubiswas/number-separator.el

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

Automatically separate groups of three (or four) numbers with commas (or periods)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published