Digit Spin Icon Digit Spin

Extension Description

Digit Spin is a small and handy extension for Visual Studio Code that gives you an ability to change numbers by incrementing and decrementing their digits one by one easily.

For more technical information, features, and examples, visit the Official Digit Spin GitHub Repository.

Problem Statement

Sometimes, when working with source code, you need to change a number or group of numbers over and over again to find the right value. It can be padding and margin or color parameters, variable values, or just a list of numbers you need to modify the same way.

One way of doing it is manual. You delete wrong values and type right ones. There are different problems that appear if using that approach, such as:

  • Making mistakes resulting in the number you didn't intend to write. Often it happens when a carry or borrow should happen. For example, you have 119 and want to increase it by one, but write 110, or 12, or other wrong variants.
  • You have to take your eyes off the result that a number represents because you are afraid of writing the wrong number or not so confident with using the number row while touch-typing. Thus, you loose a visual context of what you are trying to modify.
  • Inability to transform several numbers at once, like adding 1 to 11 and 12.

Another way is to use Emmet's increment and decrement built-in commands in VS Code. While it can solve some of the abovementioned issues, it has its own. They are:

  • Having a limited number of methods of altering numbers. It can only increment and decrement by 0.1, 1, and 10.
  • It has separate commands for any change that forces you to use the Command Palette over and over again or bind different keybindings for them.

How Digit Spin Solves These Problems

Digit Spin has a set of features that make changing numbers easy and intuitive.

  • With it, you can choose a number and work with it with just arrow keys.
  • It allows you to choose a digit you want no matter how large or small its weight is.
  • Carry and borrow rules work as you expected. Just increase the 19 by 1, and it becomes 20.
  • You can work with more than one number at the same time, and they all change independently.
  • There is no need to get distracted by manual work with numbers. Everything is understandable and controllable.
Show Extension Extension
Show Options Options