In Normal mode, you can use lowercase alphabets a-z to save some content for future use. You can also append some more content to those registers by using the corresponding uppercase alphabets A-Z at a later stage.

  • "ayy copy the current line to the "a register
  • "bdip delete the current paragraph, contents will also be saved to the "b register
  • "Ayj append the current line and the line below to the "a register
    • "ayy followed by "Ayj will result in total three lines in the "a register
  • "ap paste content from the "a register
  • "eyiw copy word under the cursor to the "e register

info You can use :reg (short for :registers) to view the contents of the registers. Specifying one or more characters (next to each other as a single string) will display contents only for those registers.

info The named registers are also used for saving macros. You can record an empty macro to clear the contents, for example qbq clears the "b register.

Video demo:


info See also my Vim Reference Guide and curated list of resources for Vim.