VSCodeVim / VSCodeVim/Vim

"g_" wrong motion when text is wrapped

Open
#7,614 1 comment 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
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:

  1. open a text file with a wrapped line in vscode with vim ext
  2. press g_
  3. open a text file with a wrapped line in vim
  4. press g_
  5. see the difference

Expected behavior
Same behaviour

Screenshots
record

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 1.22.2
  • VSCode version: 1.66.0
  • OS: Arch Linux

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.