# vim: Change logic in subword motion subword_start calculation \(\#45341\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/5a8a7d86664a235fcba9f9e437269209e73c57f0)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 5a8a7d86664a235fcba9f9e437269209e73c57f0

Requested commit: 5a8a7d86664a235fcba9f9e437269209e73c57f0

Commit: 5a8a7d86664a235fcba9f9e437269209e73c57f0

Tree: aae006f8a2270a9ce9308370112e31dee0a7939f

Author: Will Garrison

Committer: GitHub

## Message

```
vim: Change logic in subword motion subword_start calculation (#45341)

- Update subword boundary detection to stop at semantic punctuation
  (quotes, brackets, parens)
- Treat `.`, `-`, and `_` as subword separators for consistent behavior
- Extract `is_subword_start` and `is_subword_end` helpers for reuse in
  motion and object handling
- Add comprehensive tests for all subword motions matching vim's
  CamelCaseMotion behavior

Closes #23344

Release Notes:

- Fixed bug in Vim mode's subword motion punctuation handling

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
```

## Parents

- [6b1b5fa6b207ef35cfb195b5f482f67f6da2cde2](https://git.cafe/gitcafe/zed/commit/6b1b5fa6b207ef35cfb195b5f482f67f6da2cde2?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/5a8a7d86664a235fcba9f9e437269209e73c57f0?format=markdown)
