VSCodeVim / VSCodeVim/Vim

Bad Cursor motion

Open
#9,004 1 comment 2 reactions 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

Cursor motion for up and down "k & j" is not correct. If the line above or below has tab characters in it the cursor does not go straight down/up, it go somewhere unpredictable. This prevents the use of the repeat command "." with out first moving horizontally. Really slows down edits related to tab inserting or other repeated inserts/deletes

This works fine in VIM for Visual Studio, but VSCODE is not correct and really, really annoying.
Easy to reproduce.

To Reproduce
Enter something like the code below:

	#2 CpuBusHold = {Dev,Reg}; CPU_NCS = 0;
	#9 CPU_NWE = 0;
	#50 CPU_NWE = 1;
	#8 CPU_NCS = 1;
	@(posedge FpgaClk);	// resycn with cloc

In the above code there are preceding tabs (4 stops) before the "#" symbols. Place the cursor on the first "#", insert a tab character, move down a line and hit the repeat character '.' i.e.

"i(tab)(esc)j."

This has completely different behavior from VIM standalone and VIM for Visual Studio (and from every other VI editor I have ever used).

Expected behavior
Work like every other implementation.

Screenshots
Screen shots don't work for curser motion.

Yes I am on the latest VSCode and VSCodeVIM

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 reported sequence in VSCodeVim with lines containing leading tabs: insert a tab, move with j, and repeat with .; compare the cursor position and edit with Vim. Done means vertical motion and repeat editing match the expected Vim behavior without requiring horizontal movement first.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.