`[[` and `]]` motions do not work in code.
Open
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
[[ and ]]motions do not work in code. ][ and [] behave as expected.
To Reproduce
Steps to reproduce the behavior:
Open a new file and paste the following (I am using Rust):
fn a() {
// do stuff
}
struct B {
a: u32,
}
fn c() {
// do more stuff
}
- Move cursor to anywhere on the line
fn a() {and type]].- Expected Behavior: cursor moves to the open bracket in the line
struct B { - Actual Behavior: cursor moves to the end of file
- Expected Behavior: cursor moves to the open bracket in the line
- Move cursor to anywhere on the line
fn c() {and type[[.- Expected Behavior: cursor moves to the open bracket in the line
struct B { - Actual Behavior: cursor moves to the beginning of file
- Expected Behavior: cursor moves to the open bracket in the line
Screenshots
Not applicable
Environment (please complete the following information):
- Extension (VsCodeVim) version: 1.31.0
- VSCode version: Code 1.105.1 (7d842fb85a0275a4a8e4d7e040d2625abbf7f084, 2025-10-14T22:33:36.618Z)
- OS: Windows_NT x64 10.0.26100
Additional context
None
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 1.31.0 with the Rust sample and trace the handling of the [[ and ]] motions. Done means those motions move between the expected function or struct braces, while ][ and [] continue to behave as reported.
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
- Mostly clear
- Newbie friendliness
- 42/100