"g_" wrong motion when text is wrapped
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
The "g_" is supposed to move the cursor to the last printable character of the line. However in vscode, when use on a wrapped line, it move the cursor to the character where it is wrapped.
To Reproduce
Steps to reproduce the behavior:
- open a text file with a wrapped line in vscode with vim ext
- press g_
- open a text file with a wrapped line in vim
- press g_
- see the difference
Expected behavior
Same behaviour
Screenshots

Environment (please complete the following information):
- Extension (VsCodeVim) version: 1.22.2
- VSCode version: 1.66.0
- OS: Arch Linux
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 by tracing the VSCodeVim handling for the g_ motion and how wrapped lines are treated. Reproduce the behavior in VS Code and compare it with Vim using the steps in the issue. Done means g_ moves to the last printable character of the logical line rather than the wrap point.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100