Question
1. The following instructions show how to create a short file. You can correct a mistake on the line you are entering by using the
1. The following instructions show how to create a short file. You can correct a mistake on the line you are entering by using the correction keys explained in the previous lab. If you notice a mistake on a previous line, leave it as it is; you will learn how to correct these kinds of mistakes in a later lab.
a. Give the following command to open the vim editor so it is editing the file named practice. $ vim practice The screen will look like Figure 6-1 on page 166 of Sobell. If bash displays a command not found error, give the preceding command again, replacing vim with vi or vim. tiny.
b. Before you can insert text into the file you are creating, you must put vim into Input mode. Type the letter i (for Input mode) to put vim into Input mode.
c. With vim in Input mode, type a couple of short lines, ending each line with a RETURN. Make sure to end the last line with a RETURN.
d. Before you can give a command to exit from vim, you must put vim into Command mode. Press ESCAPE to put vim into Command mode.
e. With vim in Command mode, give the command ZZ (type an uppercase Z twice) to write the new file to disk and exit from vim.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started