VSCodeVim / VSCodeVim/Vim

[[ and ]] go to beginning and end of file, not by "section"

Open
#9,397 0 comments 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
I'm trying to navigating within a typescript file using the [[ and ]] commands, that are supposed to move by "section". I'm not clear exactly what a section is but in Zed it moves by a chunk of code, like one function to another. According to Neovim docs a section has some kind of relation to { symbols. But in VS Code, [[ and ]] move to the beginning and end of the TypeScript file, and the number I put at the beginning seems to have no effect.

To Reproduce
Open up any large typescript file. Put the cursor in the middle of a chunk of code. Press [[ or ]].

Expected behavior
Moves by some reasonable chunk of code, like function to function or statement to statement. I'm not familiar enough with VIM and Neovim to know exactly what it should do.

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 1.29.0
  • VSCode version: 1.96.0
  • OS: MacOS

Additional context
None

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 behavior in a large TypeScript file using the [[ and ]] commands, as described, with the reported VSCodeVim and VS Code versions. Then locate the command handling and any related tests; done should mean the commands move through meaningful sections with counts affecting the result, according to the project's defined semantics.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.