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.
gg"aVGy
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.