# Fix vim replace not escaping \`$\` \(\#53277\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 663bc9dd3510d52887b6e06608470f5bebaf2dea

Requested commit: 663bc9dd3510d52887b6e06608470f5bebaf2dea

Commit: 663bc9dd3510d52887b6e06608470f5bebaf2dea

Tree: 9f96c242bc32632a4efb4352ee77a152fc8a4cb7

Author: Phillip Davis

Committer: GitHub

## Message

```
Fix vim replace not escaping `$` (#53277)

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes ##42292

The text inserted in the search ('\$SEARCH') and replace ('$$OTHER')
inputs of the top-panel is a little anti-aesthetic, but that seems out
of scope for this issue.

Release Notes:

- '$' in the second clause of vim-style '%s/find/replace/g' actions is
correctly escaped.

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
```

## Parents

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

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