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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.