# Paste with replace

**URL:** <https://discuss.kakoune.com/t/paste-with-replace/2401>\
**Category:** Help\
**Created:** [February 11, 2024, 7:23pm UTC](https://discuss.kakoune.com/t/paste-with-replace/2401 "2024-02-11T19:23:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcc](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/marcc/32/1464_2.png) [@marcc](https://discuss.kakoune.com/u/marcc)\
**Post date:** [February 11, 2024, 7:23pm UTC](https://discuss.kakoune.com/t/paste-with-replace/2401/1 "2024-02-11T19:23:10Z")

</div>

Heya!

Typically in vim, I would cut out a line (dw for example) and then use visual mode to highlight the part I want to replace and then press p to replace it.

I notice in Kakoune, that pasting always puts something before or after the part that is selected. How do you paste and replace?

---

<div class="post-metadata">

**Author:** ![tototest99](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/tototest99/32/629_2.png) [@tototest99](https://discuss.kakoune.com/u/tototest99)\
**Post date:** [February 11, 2024, 8:01pm UTC](https://discuss.kakoune.com/t/paste-with-replace/2401/2 "2024-02-11T20:01:19Z")

</div>

`R`

`:doc keys`

---

<div class="post-metadata">

**Author:** ![marcc](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/marcc/32/1464_2.png) [@marcc](https://discuss.kakoune.com/u/marcc)\
**Post date:** [February 12, 2024, 12:56am UTC](https://discuss.kakoune.com/t/paste-with-replace/2401/3 "2024-02-12T00:56:53Z")

</div>

Awesome thanks!

I had grepped for `paste` in the docs but didn’t find anything, turns out it was there all along.
