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: subword text objects #22761

Closed
1 task done
thomasheartman opened this issue Jan 7, 2025 · 1 comment · Fixed by #22387
Closed
1 task done

Vim: subword text objects #22761

thomasheartman opened this issue Jan 7, 2025 · 1 comment · Fixed by #22387
Labels
enhancement [core label] vim

Comments

@thomasheartman
Copy link

Check for existing issues

  • Completed

Describe the feature

Zed offers you subword motions via the {Next,Previous}Subword{Start,End} commands, but, as far as I can tell, no way to use subwords as text objects.

E.g. given a camelCase word such as NextSubwordStart, I'd like to be able to do diw and only delete the current subword according to my cursor.

for instance, with | as my cursor:

Ne|xtSubwordStart

diw

SubwordStart

Zed Version and System Specs

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

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

No response

@datacubeR
Copy link

Adding subwords like in VSCode would be nice, following the example would be something like:

Ne|xtSubwordStart
di space w

should result in

SubwordStart

where space w means subword. The same is aplicable for space e or space b that would be analogous to b and e.

github-merge-queue bot pushed a commit that referenced this issue Jan 14, 2025
Closes #22761

[Vim: subword text object?
#22280](#22280)

Release Notes:

- Added Vim SubWord TextObject

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement [core label] vim
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants