VSCodeVim / VSCodeVim/Vim

`g_` should go to the end of whole line when word wrap is on

Open
#2,260 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Is this a BUG REPORT or FEATURE REQUEST? (choose one):
BUG REPORT

What happened:
With "editor.wordWrap": "on" setting, if a line wraps to multiple display lines, g_ goes to the end of display line instead of the whole line.

What did you expect to happen:
g_ goes to the end of the whole line, as native Vim does.

How to reproduce it (as minimally and precisely as possible):

  1. Use word wrap in VSCode.
  2. Move cursor to a line that wraps to multiple display lines.
  3. Press g_.
  4. See result described above.

Here is example with VSCodeVim with both g_ and vg_ commands:
sample-1.gif

Native Vim example:
sample-2.gif

Environment:

  • Extension (VsCodeVim) version: Sunny Seattle
  • VSCode version: 1.19.1
  • OS version: Ubuntu 17.10

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

Reproduce the issue in VSCodeVim with editor.wordWrap set to on, using g_ on a wrapped line and comparing the result with native Vim. Trace the g_ motion handling and verify that it reaches the end of the whole logical line rather than the current display line.

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
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.