Open ashleygould opened 4 years ago
Keep a cheat sheet of vi keyboard commands for yourself and add it to this repo.
Here is a preview of all the commands I have completed in the vi tutorial. I also completed the commands from the other lessons, however, they are more navigational commands and not anything that I can copy and paste for review.
This was exciting to learn! I'm hoping to expand my knowledge further from here. Please see below. Thanks!
Lesson 1.4: TEXT EDITING - INSERTION
** Press i to insert text. **
Move the cursor to the first line below marked --->.
To make the first line the same as the second, move the cursor on top of the first character AFTER where the text is to be inserted.
Press i and type in the necessary additions.
As each error is fixed press
---> There is some text missing from this line. ---> There is some text missing from this line.
Lesson 1.5: TEXT EDITING - APPENDING
** Press A to append text. **
1. Move the cursor to the first line below marked --->.
It does not matter on what character the cursor is in that line.
2. Press A and type in the necessary additions.
3. As the text has been appended press <ESC> to return to Normal mode.
4. Move the cursor to the second line marked ---> and repeat
steps 2 and 3 to correct this sentence.
---> There is some text missing from this line.
There is some text missing from this line.
---> There is also some text missing here.
There is also some text missing here.
Lesson 2:
---> There are some words that don't belong in this sentence.
---> Somebody typed the end of this line twice. end of this line twice
---> This is just a line with words you can move around in.
---> this line of words is cleaned up.
---> 1) Roses are red,
---> 3) Violets are blue,
---> 6) Sugar is sweet
---> 7) And so are you.
---> Fix the errors on this line and replace them with undo.
Lesson 3:
---> a) Roses are red,
---> b) Violets are blue,
---> c) Intelligence is learned,
---> d) Can you learn too?
Lesson 3.2: THE REPLACE COMMAND
** Type rx to replace the character at the cursor with x . **
Move the cursor to the first line below marked --->.
Move the cursor so that it is on top of the first error.
Type r and then the character which should be there.
Repeat steps 2 and 3 until the first line is equal to the second one.
---> When this line was typed in, someone pressed some wrong keys! ---> When this line was typed in, someone pressed some wrong keys!
NOTE: Remember that you should be learning by doing, not memorization.
Lesson 3.3: THE CHANGE OPERATOR
** To change until the end of a word, type ce . **
1. Move the cursor to the first line below marked --->.
2. Place the cursor on the u in lubw.
3. Type ce and the correct word (in this case, type ine ).
4. Press <ESC> and move to the next character that needs to be changed.
5. Rep:at steps 3 and 4 until the first sentence is the same as the second.
---> This line has a few words that need changing using the change operator.
---> This line has a few words that need changing using the change operator.
---> The end of this line needs to be corrected using the c$ command.
---> The end of this line needs to be corrected using the c$ command.
pass
From the shell work through the vim tutorial. To start the tutorial run the command:
vimtutor
Become proficient with all actions in lesson 1 summary.