Copy from one register to another
To copy or swap values between registers you can use the :let command, for example to copy the contents of the b
register to a
:
:let @a=@b
Or copy the contents of the "
register to a
:
:let @a=@"
Check this Vim Tip for some good key mapping suggestions:
- Comfortable handling of registers
You can do something like this:
let @a = getreg('"')
That'll copy the "
register to the a
register.