Saving in vi

You'll want to save changes to your documents frequently, especially as you're learning to use vi (Figure 4.11). Until you're accustomed to switching between command and input mode, you may accidentally type in commands when you think you're typing text, with unpredictable results. To save files, just follow these steps.

Figure 4.11. Save early, save often. That's the safe rule for vi.

To save text in vi:

  • 							 :w limerick
    Press to get ...

Get Unix: Visual QuickStart Guide 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.