Chapter 20. Using vi to Edit a Text File

Steve “Mor” Moritsugu

  • Ways to insert text

  • Ways to move within the document

  • Ways to delete text

  • Ways to change text

Tip for Beginners

Every UNIX user should know the basics of how to edit text files using vi, because vi is the only editor that is standard on all UNIX systems. While vi has more than 75 separate commands, you can edit anything if you learn just the first 10 commands this chapter give you. This chapter covers all the basics of vi. The next chapter shows how to use these basics to automate repetitive editing tasks that can make you far more productive than using a mouse.

Get Practical UNIX now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.