[vi editor] Using vieditor to edit a file as follows: $ vi file 4. Amy looked at
ID: 3754229 • Letter: #
Question
[vi editor] Using vieditor to edit a file as follows: $ vi file 4. Amy looked at her watch. He was late. The sun was setting but Jake didn't care. i. To replace the first "was" with "were", the command should be ii. To replace all "was" with "were", the command should be iii To copy the first two lines to the clipboard, the command should be To paste the yanked lines before your current cursor, the command should be iv. v. To undo the previous command, the command should be vi. To redo the previous command, the command should be vii. To display the line number inside your file, the command should be To remove the line number inside your file, the command should be viii.Explanation / Answer
Commands :
1. To replace the first “was” with “were”, the command :
Syntax : :%s/WORD-TO-FIND-HERE/Replace-word-Here/g
:%s/was/were/g
2. To replace all “was” with “were”, the command :
:%s/was/were/gi
3. To copy the first two lines to the clipboard, the command :
"b2yy
4. To paste the yanked lines before your cursor, The command :
aP
5. To undo the previous command, the command :
u
6. To redo the previous command, the command :
Ctrl+r
7. To display the line number inside your file, the command :
set number
or
set nu
8. To remove the line number inside your file, the command :
set nonumber
or
set nu!
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.