# vim: Change surrounds with Mini\{Quotes,Brackets\} and AnyQuotes \(\#51067\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 5409d4793f1f3208993bb3d26496bf0c6b5efc44

Requested commit: 5409d4793f1f3208993bb3d26496bf0c6b5efc44

Commit: 5409d4793f1f3208993bb3d26496bf0c6b5efc44

Tree: 7bdb4314591676768d729306c92df572bc13fcc0

Author: Ian Chamberlain

Committer: GitHub

## Message

```
vim: Change surrounds with Mini{Quotes,Brackets} and AnyQuotes (#51067)

Part of #48241 (`dsq` still needs to be implemented, I can try to do in
another PR if+when this is merged)

AnyBrackets was already supported, and these various surrounds were
supported with other vim motions, this just brings parity for "change
surrounds".
	
Also adds MiniBrackets support since it works the same way as MiniQuotes
does.

Most of this change is just test cases for vim edits with `csq` + `csb`,
using the keybinds described in the docs:
https://zed.dev/docs/vim#any-bracket-functionality

Also did a slight refactor to reuse some constants for supported pairs,
for consistency.


Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- Fixed vim `change surrounds` for MiniQuotes, MiniBrackets, and
AnyQuotes
```

## Parents

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

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