VI Basics Exercise
You will submit the answers to the question in one file uploaded to moodle. Learn the answers to the questions from the tutorials suggested
Learn and practice VI:
Run through the vim tutorial http://linuxconfig.org/vim-tutorial ,
First, copy the gnulicense.txt file from my folder to yours using cp /home/pe16132/public_html/csc270/note/gnulicense.txt .
Then, run the commands listed on each step of the tutorial. To see what is happening on each step, press the > button to see the little video.
If you prefer use: http://www.openvim.com/
Here is one more choice if you are already familiar with vi : http://heather.cs.ucdavis.edu/~matloff/UnixAndC/Editors/ViIntro.html (just up to section 3)
Then create a file named VI_Answers that answers these questions:
How do you exit vi without altering the file you have open?
How do you delete the current line?
Suppose you delete a line; can you somehow reverse that operation?
What is the quickest way to navigate to the last line of a file? How about to the top of a file?
How do you search for the word "the" in a file?
How do you replace the word "the" with the word "between" in a file? (This answer can be skipped if you did the openvim tutorial.)
some questions from http://www.wordesign.com/unix/homework/session2.htm