Skip to content

vim: Getting stuck in end tag when jumping between html tags using % (vim::Matching) #41582

@j-wiren

Description

@j-wiren

Summary

In vim mode when using the % keystroke (vim::Matching) on an html start tag the cursor jumps to the end tag as expected, but when doing % again it jumps from / of the end tag to its > instead of jumping back to the start tag again.

Description

Noticed this behavior for plain HTML but also for markup in JSX/TSX files.

Steps to reproduce:

  1. Enable vim mode
  2. Create html file
  3. Insert <html></html>
  4. Move cursor inside start tag
  5. Hit % keystroke multiple times

Expected Behavior: Cursor jumps back and forth between start and end tag.

Video example
Screen.Recording.2025-10-30.at.16.39.33.mov

Actual Behavior: Cursor jumps to end tag and then "gets stuck" jumping between angle brackets of end tag.

Video example
Screen.Recording.2025-10-30.at.16.35.51.mov

Zed Version and System Specs

Zed: v0.210.4 (Zed)
OS: macOS 26.0.1
Memory: 16 GiB
Architecture: aarch64

Metadata

Metadata

Assignees

No one assigned

    Labels

    htmlHTML markup supportreproducibleVerified steps to reproduce includedvim

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions