NumberFormatter
Format numbers with decimal and thousands separators
Details
Installs
- Total 480
- Win 282
- Mac 158
- Linux 40
Dec 22 | Dec 21 | Dec 20 | Dec 19 | Dec 18 | Dec 17 | Dec 16 | Dec 15 | Dec 14 | Dec 13 | Dec 12 | Dec 11 | Dec 10 | Dec 9 | Dec 8 | Dec 7 | Dec 6 | Dec 5 | Dec 4 | Dec 3 | Dec 2 | Dec 1 | Nov 30 | Nov 29 | Nov 28 | Nov 27 | Nov 26 | Nov 25 | Nov 24 | Nov 23 | Nov 22 | Nov 21 | Nov 20 | Nov 19 | Nov 18 | Nov 17 | Nov 16 | Nov 15 | Nov 14 | Nov 13 | Nov 12 | Nov 11 | Nov 10 | Nov 9 | Nov 8 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Mac | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 | 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 | 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
- Package Control
- Install Package Control
- Bring up the Command Palette and type “Package Control: Install Package”
- Type “NumberFormatter” and press enter
- Directly
- Locate the
Packages
folder in the data directory - Download the latest version of NumberFormatter
- Extract the archive into the
Packages
folder
- Locate the
- Development
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 numbersthousands_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:
- Expand Selection to Whitespace by Paul Sarena Licensed under: MIT License