A
A
Andrew2016-12-07 21:23:35
vim
Andrew, 2016-12-07 21:23:35

How to add the contents of another file to the end of a file in the vi editor, is there such a command in principle?

For example, we open the text1 file in the editor, how to add the entire contents of the text2 file that is not open in the editor to the end of the text?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew, 2016-12-07
@KotTyhan

Found the answer in this book: docstore.mik.ua/orelly/unix/vi/ch05_04.htm
The :r <filename> command will insert the contents of <filename> on the next line after the cursor in the edited file.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question