VSCodeVim / VSCodeVim/Vim

Some `[count] command` has different behavior from Vim when the count is too large.

Open
#6,400 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

In my opinion, this may not be a bug, it is a feature.
For example, if you use 5 ]] in the first line of a text who only contains 2 paragraph, VSCodeVim will move the cursor to the last line of the text, but Vim will do nothing since it cannot move 5 paragraph which is larger than the paragraph left(I guess).
The same with C also. For 2 C, when the file is empty, Vim cannot go into insert mode but VSCodeVim will go into insert mode. The behavior of number C is weird in Vim when there are 0 or 1 line.
I cannot determine which behavior is "correct" or more reasonal. Hope your opinion.

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

Start by reproducing the 5 ]] and 2 C cases described in VSCodeVim and compare them with Vim, including empty and very short files. Determine the intended behavior for oversized counts, then document the decision and verify that the affected commands behave consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.