vimtricks.wiki Concise Vim tricks, one at a time.

How do you yank the entire file contents into a register?

Answer

gg"aVGy

Explanation

Go to the first line with gg, then visually select from there to the last line with VG, and yank into register a. The entire file is now in @a.

Next

How do you yank a single word into a named register?