14

I need to do a

Ctrl+A, Ctrl+V

to paste in a very long file, but I do not know the set of commands that can do this action in the most efficient way.

Thank you.

UnrealApex
  • 438
  • 6
  • 14
Kvasir
  • 1,167
  • 3
  • 15
  • 31

1 Answers1

15

You can do:

ggVGY

and then open another file in vi and paste with P.

  • GG - jump to the beginning of file
  • V - select whole lines in visual mode
  • G - jump to end of file
  • Y - copy (yank) what you selected

However, before posting a question, try to search first. See for example this question.

MByD
  • 133,244
  • 25
  • 260
  • 270
macfij
  • 2,973
  • 1
  • 18
  • 23