Kvasir
Kvasir

Reputation: 1261

How can I do a CTRL + A and a CTRL + C?

I need to do a

Ctrl + A, Ctrl + V

to paste in a very long file, but what is the set of commands that can do this action in the most efficient way?

Upvotes: 16

Views: 30595

Answers (1)

macfij
macfij

Reputation: 3209

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 Yank entire file

Upvotes: 22

Related Questions