Let’s say I have a piece of text within my code which I want duplicated.
What I’ve been doing so far is to move to the start, press v to enter visual mode, then move to the end, press y to yank the text, move one character back and then p to put it there.
Is there an easier way? Something like:
- Select text with
v. - Press some sequence of commands and there is – it’s duplicated.
If it’s the “move one char back” you’re trying to avoid, press
Prather thanpfor the “paste” operation.