Skip to content

Conversation

@Pranav2612000
Copy link
Contributor

Closes #41582

Release Notes:

  • Improves the '%' vim motion for html by moving the cursor to the opening tag when its positioned on the / ( slash ) of the closing tag
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Nov 12, 2025
@Pranav2612000
Copy link
Contributor Author

This works, but not sure if this is the best way to handle it. I think the LSP returns the range for the opening and closing tags which includes both the < and the / together.

@Pranav2612000 Pranav2612000 changed the title vim: move to opening html tag from / in closing tag Nov 12, 2025
@P1n3appl3
Copy link
Contributor

Sorry for the delay in reviewing. This change looks good, and I think it's fine to hack it in just for that case. Could you add a test or at least an extra test case to an existing one like this to verify that our behavior matches neovim's in this case?

@Pranav2612000 Pranav2612000 force-pushed the feat/vim-motion-move-to-opening-html-tag-from-slash branch from 93e465f to f892375 Compare November 29, 2025 06:18
@Pranav2612000
Copy link
Contributor Author

@P1n3appl3 Thank you for the review. I've updated the commit to include a test now( added to the existing test case - thought that should be enough ). Can you please take another look whenever you have time?

@Pranav2612000 Pranav2612000 force-pushed the feat/vim-motion-move-to-opening-html-tag-from-slash branch from f892375 to 32dca5f Compare November 29, 2025 07:49
@Pranav2612000 Pranav2612000 force-pushed the feat/vim-motion-move-to-opening-html-tag-from-slash branch from 32dca5f to f202ce4 Compare November 29, 2025 08:06
@P1n3appl3 P1n3appl3 merged commit 23e5477 into zed-industries:main Dec 2, 2025
23 checks passed
@Edgarfp
Copy link

Edgarfp commented Dec 5, 2025

Finally fixed! Thank you!

@franciskafyi franciskafyi moved this from Community PRs to Done in Quality Week – December 2025 Dec 13, 2025
CherryWorm pushed a commit to CherryWorm/zed that referenced this pull request Dec 16, 2025
…2513)

Closes zed-industries#41582

Release Notes:

- Improves the '%' vim motion for html by moving the cursor to the
opening tag when its positioned on the `/` ( slash ) of the closing tag
someone13574 pushed a commit to someone13574/zed that referenced this pull request Dec 16, 2025
…2513)

Closes zed-industries#41582

Release Notes:

- Improves the '%' vim motion for html by moving the cursor to the
opening tag when its positioned on the `/` ( slash ) of the closing tag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

3 participants