Publishers of technology books, eBooks, and videos for creative people

Home > Articles

  • Print
  • + Share This
This chapter is from the book

Importing Files into vi

You can also merge multiple files in vi by reading additional files into the current one, as shown in red_a.jpg. Basically, all this means is that you insert one file into the file you’re currently editing.

085fig01.jpg

Click to view larger image

red_a.jpg Reading an additional file into the current one can make your editing tasks much easier.

To import files in vi:

  1. vi hairyspider

    At the shell prompt, type vi followed by the filename—in this case, the hairyspider file.

  2. esc.jpg:r filename

    At the point in the file where you want to import text, press esc.jpg, then type :r and the filename you want to read into the file.

  • + Share This
  • 🔖 Save To Your Account