A Sublime Text plugin to increase/decrease values (integer, float, Roman numerals, boolean, etc.) with one keystroke.
Inspired by C-a
and C-x
in vim and nextval.
Integers and decimals:
value | decrement | increment |
---|---|---|
5 | 4 | 6 |
-1 | -2 | 0 |
001 | 000 | 002 |
4.99 | 4.98 | 5.00 |
-1.1 | -1.2 | -1.0 |
.2 | .1 | .3 |
2. | 1. | 3. |
Binary and hexadecimal:
value | decrement | increment |
---|---|---|
0xe | 0xd | 0xf |
0b1010 | 0b1001 | 0b1011 |
Roman numerals:
Cases are auto handled.
Caveats: Roman numerals > 100 (rarely used) or < 1 (not applicable) are not supported.
value | decrement | increment |
---|---|---|
III | II | IV |
ix | viii | x |
Booleans:
Cases are auto handled.
value | decrement | increment |
---|---|---|
TRUE | FALSE | FALSE |
True | False | False |
yes | no | no |
Install Package Control and search for Increment Decrement
.
Clone this repo to your package folder Preferences -> Browse Packages
.
Place the cursor around the value or select the wanted value, then hit the keystroke!
Tip: Use multi-cursors to select multiple values.
- Select a region and hit cmd + shift + l to place cursors to every EOL (official doc).
- Hold cmd ( ctrl on windows) and click to place multiple cursors.
- cmd + ctrl + a : increase the values
- cmd + ctrl + x : decrease the values
- ctrl + alt + a : increase the values
- ctrl + alt + x : decrease the values
Hit cmd + shift + p and search increment
or decrement
.
- Where we started
- Inc-Dec-Value: A good and similar package, but unmaintained.
MIT