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: inconsistent NextWordStart / NextSubwordStart behavior #25450

Open
thomasheartman opened this issue Feb 24, 2025 · 1 comment
Open

Vim: inconsistent NextWordStart / NextSubwordStart behavior #25450

thomasheartman opened this issue Feb 24, 2025 · 1 comment

Comments

@thomasheartman
Copy link
Contributor

Summary

NextWordStart and NextSubwordStart appear to treat punctuation differently. NextWordStart stops at punctuation, NextSubwordStart ignores punctuation and goes to the next word after a space

Steps to trigger the problem:

  1. In a new file, with vim mode active, enter the text "word, next"
  2. In normal mode, with your cursor somewhere in "word", visually select or delete with NextWordStart and NextSubwordStart
  3. Notice the behavior is different

Actual Behavior:
From this starting point:

Image

delete NextWordStart (does as I expect and deletes up until the comma)

Image

delete NextSubwordStart (deletes past the comma up until the next word separated by whitespace)

Image

Expected Behavior:

They should behave the same in this case (I'd expect the NextWordStart behavior).

My context stack tells me that they're using equivalent commands (the vim operator in the context is incorrect as it changes when I set up the screenshot command; it should be d):

Word:

Image

Subword
Image

Zed Version and System Specs

Zed: v0.174.6 (Zed)
OS: macOS 14.6.1
Memory: 16 GiB
Architecture: aarch64

@0x2CA
Copy link
Contributor

0x2CA commented Feb 24, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants