To copy all the content of a file in Vim to the clipboard, you can use the following command:
ESC key to quit from insert mode to normal mode, then press
: to type in the command above(
Basically, this command yanks (copies) all the lines in the file to the system clipboard. The
% symbol indicates that you want to operate on all lines, and
y letter is the yank command. The
+ sign tells Vim to use the system clipboard.