Vi Emulator (24 Poins Please state complete each task in backspace are not the m
ID: 3739783 • Letter: V
Question
Vi Emulator (24 Poins Please state complete each task in backspace are not the mode you would une and the commands (Qeystrokel that you w For this exerch the use of amow keys, delete, and The content of kevin.txt is displayed below 1. Hello my name is KIVIN 2. This is my first-year teaching ENGR 212 3. I find UNIX to be a powerful light weight operating system 4. I find it interesting that are also referred to as utir 5. The v/vim editor is a very useful tool with many applications. 1) Suppose you were working in the shell and you wanted to edt a file named kevin.toxt in the ni editor. How would you open Kevin.txt in the vi edtor? Kevin.txt is open in the vi editor and you noticed KEVIN is fully capitalized. To be grammatically correct, KEVIN should be replaced with Kevin. Please Specify, the models) and how you would navigate to modify Kevin.bxt. (Remember arrow keys, backspace, and delete are not allowed Line 1 should look like this: 1. Hello my name is Kevin 3) Assume you are at line 1, You want to jump to the last line (Line 5) and make a copy of the line and paste it above. Please specify the command/s) you would use to navigate to the last line, make a copy of the line and paste it above. (Remember arrow keys, backspace, and delete are not allowed) Kevin.txt should look like this: 1. Hello my name is Kevin 2. This is my first-year teaching ENGR 212. 3. I find UNIX to be a powerful light weight operating system 4. I find it interesting that commands are also referred to as utilities 5. The vi/vim editor is a very useful tool with many applications 5. The vi/vim editor is a very useful tool with many applications.Explanation / Answer
1)
To open file:
$ vi kevin.txt
2)
Mode: command mode
Command: :%s/KEVIN/Kevin/cg
This command searches for all occurrences of KEVIN and replaces them with Kevin. Option cg is used so that vi asks for confirmation before replacing each occurrence.
3)
Mode: command mode
To navigate to line 5: :5 Press enter
To copy: yy or y
To paste: P
All the commands executed in command mode.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.