# Make word deletions less greedy \(\#37352\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 0cbacb850082e92aa1503efac06b0f595444a8d3

Requested commit: 0cbacb850082e92aa1503efac06b0f595444a8d3

Commit: 0cbacb850082e92aa1503efac06b0f595444a8d3

Tree: bc84ef4562c68c1bde847f922ea815de5b8c6fcf

Author: Kirill Bulatov

Committer: GitHub

## Message

```
Make word deletions less greedy (#37352)

Closes https://github.com/zed-industries/zed/issues/37144

Adjusts `editor::DeleteToPreviousWordStart`,
`editor::DeleteToNextWordEnd`, `editor::DeleteToNextSubwordEnd` and
`editor::DeleteToPreviousSubwordStart` actions to

* take whitespace sequences with length >= 2 into account and stop after
removing them (whilst movement would also include the word after such
sequences)

* take current language's brackets into account and stop after removing
the text before them

The latter is configurable and can be disabled with `"ignore_brackets":
true` parameter in the action.

Release Notes:

- Improved word deletions to consider whitespace sequences and brackets
by default
```

## Parents

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

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