usernamehw / vscode-incrementor

Advanced increment / decrement actions for (almost) anything.
https://marketplace.visualstudio.com/items?itemName=usernamehw.incrementor
MIT License
3 stars 1 forks source link

Leading/trailing zeros removed #4

Open usernamehw opened 4 years ago

usernamehw commented 4 years ago

Working on CSV files containing numbers with leading zeros, and incrementing them removed the zeros.

01,BP,0000006760,Test
01,BP,0000006760,Test
01,BP,0000006760,Test
01,BP,0000006760,Test

Becomes

01,BP,6761,Test
01,BP,6761,Test
01,BP,6761,Test
01,BP,6761,Test

Workaround is of course selecting only the 6760 instead of the whole 0000006760, but it seems a little off for me.

Please make it possible to keep the same number of zeroes after decimal point too:

1.0 -> 2.0
1.00 -> 2.00
1.010 -> 2.010
pojitonov commented 10 months ago

The only missing feature is the ability to retain decimals after the dot. This is particularly problematic for GLSL shaders, where decimals are frequently required, such as in values like 1.0, 2.0, etc. Having a setting to preserve decimals would greatly enhance the usability of the plugin.