YouSince vim uses the percent sign to reference the current buffer, you can use it to get everything quickly.
:%y
towill yank the entire buffer without moving the cursor and
:%y+
will putyank it into the +
register (and presumably the clipboard, provided vim was compiled with the proper options).
Similarly, :%d
and :%d+
will deletedo the entire buffersame for deletion.
In each of these cases, the cursor remains in place.