DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 963,274 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
Jonas Schumacher
Jonas Schumacher

Posted on

VIM Tip: Replace Without Yanking

You yanked a word and want to use it to replace more than one other word. The naive approach of selecting each of these other words and then hitting p doesn't really work though, does it?

This is because the first p yanks the highlighted word at the same time, replacing the original word in the register.

The solution is to paste from the 0th register directly:

"0p

That you can do however many times you like.

Top comments (0)

🌚 Friends don't let friends browse without dark mode.

Sorry, it's true.