zed icon indicating copy to clipboard operation
zed copied to clipboard

Vim mode "%" matching tag jumping does not work

Open whj768702 opened this issue 11 months ago • 2 comments

Summary

I develop react. and i make a small demo.

function App() {
  return (
    <div>
      <div rules={[{required: true}]}>
        <h1>Hello, World!</h1>
      </div>
    </div>
  );
}

https://github.com/user-attachments/assets/85899982-f7ff-4d94-8d97-5f7980520b1c

Zed Version and System Specs

Zed 0.179.5 Mac OS 15.3.2 (24D81)

whj768702 avatar Apr 03 '25 01:04 whj768702

Seems we're being a bit to eager to match tags instead of regular brackets. Thanks for reporting!

probably-neb avatar May 20 '25 14:05 probably-neb

While trying to fix this I also discovered some other incorrect behavior. In html we correctly jump from closing tags to their corresponding opening tag, but in jsx the backwards jump seems to be failing. I'm adding tests for that case, and the brackets-within-tags one from this issue and will try to address both.

P1n3appl3 avatar Jun 03 '25 21:06 P1n3appl3