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
  • 578
  • 9
  • 23
Kvasir
  • 1,197
  • 4
  • 17
  • 31

1 Answers1

18

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
  • 135,866
  • 28
  • 264
  • 277
macfij
  • 3,093
  • 1
  • 19
  • 24