Registers
- A yank (copy) or delete (cut) can copy the text into a specified register.
- A register is specified with a double-quotes (
") followed by the register name which precedes the y or d command. - There are several registers available:
- The default, unnamed register
"" - Standard named register
"A-"Zor"a-"z(case insensitive) - The clipboard register
"+. - (available in GUI Vims, and defaults to the unnamed register on console Vims)
- The default, unnamed register
- Registers
1-9which provide history of the copied texts. - Other special registers. (check :help registers)
- Registers
- To paste a text from a register use the
"{reg}pcommand.
Examples
"sy$- yanks the text until the end of the line into register 's'.gg"+yG- copies the entire file to the clipboard.