# vim: Improve pasting while in replace mode \(\#41549\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 8aa2158418ea30ae391ac6624002bee2125d904b

Requested commit: 8aa2158418ea30ae391ac6624002bee2125d904b

Commit: 8aa2158418ea30ae391ac6624002bee2125d904b

Tree: 2f43780d4c051cfd81ea4a940e2c9778300713a2

Author: Dino

Committer: GitHub

## Message

```
vim: Improve pasting while in replace mode (#41549)

- Update `vim::normal::Vim.normal_replace` to work with more than one
  character
- Add `vim::replace::Vim.paste_replace` to handle pasting the 
  clipboard's contents while in replace mode
- Update vim's handling of the `editor::actions::Paste` action so that
  the `paste_replace` method is called when vim is in replace mode,
  otherwise it'll just call the regular `editor::Editor.paste` method

Closes #41378 

Release Notes:

- Improved pasting while in Vim's Replace mode, ensuring that the Zed
replaces the same number of characters as the length of the contents
being pasted
```

## Parents

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

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