Skip to content

[[ and ]] motions do not work in code. #9799

@brasswood

Description

@brasswood

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions