VSCodeVim / VSCodeVim/Vim

Increase number CTRL-A

Open
#9,506 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
15.2k
Forks
1.5k
Avg merge
3d 18h
Merged PRs (30d)
6

Description

Describe the bug
If the numbers to increase have a zero at the left and the last number is a 7 instead of increar a number increas a 3 numbers.

To Reproduce

  1. Write a number with zeros at the left and ending in 7 any number with the folowing format: 0xxx7. For examplo 017
  2. Try to increas one number using CTRL-A
  3. The result should be 018 but it is 020

Expected behavior
I expect to increas just one number, this behavior does not occur if you do not set the leading zero.

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 1.29.0
  • VSCode version: 197.2
  • OS: Windows 10 / Ubuntu 24

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the CTRL-A increment with a leading-zero value such as 017 in the VSCodeVim extension, using the reported versions and operating systems as context. Trace the number-increment handling from that command and verify that 017 becomes 018 rather than 020, while numbers without a leading zero retain their existing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.