ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Number​Formatter

by ilyakam ALL

Format numbers with decimal and thousands separators

Details

Installs

  • Total 448
  • Win 264
  • Mac 146
  • Linux 38
Apr 26 Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13
Windows 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

NumberFormatter - A Sublime Text Plugin

This Sublime Text plugin formats plain numbers by adding a thousands separator to them. It also unformats them in reverse. See the Features section below for details.

Installation

Usage

  • Linux: ctrlshiftcomma
  • macOS: commandshiftcomma
  • Windows: ctrlshiftcomma

Features:

As long as the number is partially or fully selected, or while the cursor is on the number, this plugin will format or unformat it in the following way:

Before After
12345 12,345
12,345 12345
12345.67 12,345.67
12,345.67 12345.67

This plugin supports multiple cursors and multiple selections. It can process both formatted and unformatted numbers in one go.

Options

To change the settings, simply edit the NumberFormatter.sublime-settings file that's included with the plugin:

  • decimal_separator - the character that separates between whole and decimal numbers
  • thousands_separator - the character that groups numbers in the thousands, millions, billions, etc.
  • format_thousands - whether or not to add a thousands separator to numbers between 1000 and 9999

Warnings

  • Numbers with preceding zeros are formatted anyway (000123 » 000,123)
  • When the thousands_separator is set to an empty space (" "), the whole number must be selected in order to unformat it (12 345 » 12345)

Changelog

See CHANGELOG.md

Contributing

See CONTRIBUTING.md

License

See LICENSE.md

Software Credits

The development of this software was made possible using the following components: