Slow line movement
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
One of the main advantages of Vim is its insane SPEED. Everything works instantly, specially the cursor movement, but it's way too slow with this plugin.
To Reproduce
When I try to move 20 lines down for example (with the command 20j), it clearly shows that it is looping "j" 20 times, which is extremely slow.
This also affects other commands that uses the character movement like Yank, Delete, Select, etc.
Expected behavior
Instead of looping, it should take the current line number as reference, add the desired amount of movement to that number, and jump to that.
For example, if I'm in line 123 and want to go 20 lines down with 20j, it should perform the equivalent to a 143G command instead of looping.
Of course, this should also affect the other refered commands.
Environment (please complete the following information):
Tested on Windows 10 and Ubuntu 22.04, with basically any version of VSCode and Vim plugin.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start from the counted 20j movement entry point and trace how repeated character movement is used by Yank, Delete, and Select. Reproduce the slowdown with a multi-line count, then verify that movement and the related commands use direct line-based movement while preserving their expected behavior.
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
- Mostly clear
- Newbie friendliness
- 35/100