Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vim: Cannot use % to jump to matching tag #12986

Closed
1 task done
sadiksaifi opened this issue Jun 13, 2024 · 5 comments · Fixed by #20536
Closed
1 task done

vim: Cannot use % to jump to matching tag #12986

sadiksaifi opened this issue Jun 13, 2024 · 5 comments · Fixed by #20536
Labels
editor Feedback for code editing, formatting, editor iterations, etc enhancement [core label] vim

Comments

@sadiksaifi
Copy link

sadiksaifi commented Jun 13, 2024

Check for existing issues

  • Completed

Describe the feature

When working with .jsx, .tsx, .html and etc files, the Shift + 5 keybinding does not jump between open and closing HTML/JSX tags although it works for brackets. This keybinding is expected to help navigate between matching pairs of tags but fails to do so.

Steps to Reproduce:

  1. Open any .jsx, .tsx, or .html file in Vim.
  2. Place the cursor on an opening or closing HTML/JSX tag.
  3. Press Shift + %.
  4. Expected Behavior:
  5. The cursor should jump to the matching closing or opening tag.

Actual Behavior:

  • No navigation occurs, or the cursor jumps incorrectly.

Additional Information:
I have attached a video as well for more info, and this video is of Neovim 0.9 with tsserver lsp.

Zed version: 0.139.3
OS: MacOS Sonoma 14.5

If you guys fix, I am sold for Zed!

If applicable, add mockups / screenshots to help present your vision of the feature

Screen.Recording.2024-06-13.at.8.42.22.PM.mov
@sadiksaifi sadiksaifi changed the title [vim]: Shift + % Not Working for HTML/JSX Tag Navigation in .jsx/.tsx/.html Files vim: Shift + % Not Working for HTML/JSX Tag Navigation in .jsx/.tsx/.html Files Jun 13, 2024
@sadiksaifi sadiksaifi changed the title vim: Shift + % Not Working for HTML/JSX Tag Navigation in .jsx/.tsx/.html Files [vim]: Shift + % Not Working for HTML/JSX Tag Navigation in .jsx/.tsx/.html Files Jun 13, 2024
@notpeter notpeter added vim editor Feedback for code editing, formatting, editor iterations, etc and removed triage labels Jun 13, 2024
@sadiksaifi sadiksaifi changed the title [vim]: Shift + % Not Working for HTML/JSX Tag Navigation in .jsx/.tsx/.html Files [vim]: Shift + 5 Not Working for HTML/JSX Tag Navigation in .jsx/.tsx/.html Files Jun 14, 2024
@ConradIrwin ConradIrwin changed the title [vim]: Shift + 5 Not Working for HTML/JSX Tag Navigation in .jsx/.tsx/.html Files vim: Cannot use % to jump to matching tag Jun 15, 2024
@sadiksaifi
Copy link
Author

@ConradIrwin has looked at the issue or not ?

@ConradIrwin
Copy link
Member

Not yet! If you want to pair with me on a fix: https://calendly.com/conradirwin/pairing

@sadiksaifi
Copy link
Author

@ConradIrwin I would have love to help you but I don't have enough rust knowledge

@sadiksaifi
Copy link
Author

sadiksaifi commented Aug 19, 2024

@ConradIrwin @as-cii @maxbrunsfeld @nathansobo
Guys I know there would have been other important issues/feature which would be more important than this issue/feature but this is the only one which is stopping me to completely switch to zed.
I am open for any help to get this issue resolved, it's just that I don't know enough rust to fix this issue. I am still learning.

@davidreuss
Copy link

is it feasible to support this feature in a generic way, where you want to jump between matching {, ( and ], without it being powered by tree sitter queries? so it would work in any file out of the box like vim for instance?

or is there an existing way to solve that problem with current zed features?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor Feedback for code editing, formatting, editor iterations, etc enhancement [core label] vim
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants