`g_` should go to the end of whole line when word wrap is on
Nobody has claimed this yet.
- 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):
- Use word wrap in VSCode.
- Move cursor to a line that wraps to multiple display lines.
- Press g_.
- See result described above.
Here is example with VSCodeVim with both g_ and vg_ commands:

Native Vim example:

Environment:
- Extension (VsCodeVim) version: Sunny Seattle
- VSCode version: 1.19.1
- OS version: Ubuntu 17.10
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
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