In emacs, yanking works something like this: if you delete something, it can be yanked back into another position. In other words, emacs's yank is sort of like cut and paste. On the other hand, it seems like vim's yank is like copy and paste: I can yank something and then paste it elsewhere, but the original text is still there. Is there any way to cut the text rather than just copying it in vim?
2 Answers
Use d
where you normally use y
.
You can also use x
to delete individual characters (highlighted characters if in visual mode), and paste them using p
.