@@ -20,7 +20,6 @@ _________________________________________________________________
20 the first lesson.
20 the first lesson.
24=================================================================
23=================================================================
25= BASIC CURSOR MOVEMENT =
24= BASIC CURSOR MOVEMENT =
26=================================================================
25=================================================================
@@ -43,7 +42,6 @@ _________________________________________________________________
47=================================================================
45=================================================================
48= EXITING HELIX =
46= EXITING HELIX =
49=================================================================
47=================================================================
@@ -66,7 +64,6 @@ _________________________________________________________________
70=================================================================
67=================================================================
71= DELETION =
68= DELETION =
72=================================================================
69=================================================================
@@ -89,7 +86,6 @@ _________________________________________________________________
93=================================================================
89=================================================================
94= INSERT MODE =
90= INSERT MODE =
95=================================================================
91=================================================================
@@ -112,7 +108,6 @@ _________________________________________________________________
112 Note: The status bar will display your current mode.
108 Note: The status bar will display your current mode.
113 Notice that when you press i, 'NOR' changes to 'INS'.
109 Notice that when you press i, 'NOR' changes to 'INS'.
116=================================================================
111=================================================================
117= MORE ON INSERT MODE =
112= MORE ON INSERT MODE =
118=================================================================
113=================================================================
@@ -123,7 +118,7 @@ _________________________________________________________________
124 Common examples of insertion commands include:
119 Common examples of insertion commands include:
125 i - Insert before the selection.
120 i - Insert before the selection.
126− a - Insert after the selection. (a means "append")
121+ a - Insert after the selection. (a means 'append')
127 I - Insert at the start of the line.
122 I - Insert at the start of the line.
128 A - Insert at the end of the line.
123 A - Insert at the end of the line.
@@ -135,7 +130,6 @@ _________________________________________________________________
135 --> This sentence is miss
130 --> This sentence is miss
136 This sentence is missing some text.
131 This sentence is missing some text.
139=================================================================
133=================================================================
140= SAVING A FILE =
134= SAVING A FILE =
141=================================================================
135=================================================================
@@ -158,7 +152,6 @@ _________________________________________________________________
162=================================================================
155=================================================================
164=================================================================
157=================================================================
@@ -181,7 +174,6 @@ _________________________________________________________________
185=================================================================
177=================================================================
186= MOTIONS AND SELECTIONS =
178= MOTIONS AND SELECTIONS =
187=================================================================
179=================================================================
@@ -204,7 +196,6 @@ _________________________________________________________________
208=================================================================
199=================================================================
209= MORE ON MOTIONS =
200= MORE ON MOTIONS =
210=================================================================
201=================================================================
@@ -227,6 +218,203 @@ _________________________________________________________________
221+=================================================================
222+= THE CHANGE COMMAND =
223+=================================================================
225+ Press c to change the current selection.
227+ The change command deletes the current selection and enters
228+ Insert mode, so it is a very common shorthand for di.
230+ 1. Move the cursor to the line below marked -->.
231+ 2. Move to the start of an incorrect word and press w to
233+ 3. Press c to delete the word and enter Insert mode.
234+ 4. Type the correct word.
235+ 5. Repeat until the line matches the line below it.
237+ --> This paper has heavy words behind it.
238+ This sentence has incorrect words in it.
243+=================================================================
244+= COUNTS WITH MOTIONS =
245+=================================================================
247+ Type a number before a motion to repeat it that many times.
249+ 1. Move the cursor to the line below marked -->.
251+ 2. Type 2w to move 2 words forward.
253+ 3. Type 3e to move to the end of the third word forward.
255+ 4. Type 2b to move 2 words backwards
257+ 5. Try the above with different numbers.
259+ --> This is just a line with words you can move around in.
265+=================================================================
267+=================================================================
269+ Press x to select a whole line. Press again to select the next.
271+ 1. Move the cursor to the second line below marked -->.
272+ 2. Press x to select the line, and d to delete it.
273+ 3. Move to the fourth line.
274+ 4. Press x twice or type 2x to select 2 lines, and d to delete.
276+ --> 1) Roses are red,
278+ --> 3) Violets are blue,
279+ --> 4) I have a car,
280+ --> 5) Clocks tell time,
281+ --> 6) Sugar is sweet,
282+ --> 7) And so are you.
287+=================================================================
289+=================================================================
291+ Type u to undo. Type U to redo.
293+ 1. Move the cursor to the line below marked -->.
294+ 2. Move to the first error, and press d to delete it.
295+ 3. Type u to undo your deletion.
296+ 4. Fix all the errors on the line.
297+ 5. Type u several times to undo your fixes.
298+ 6. Type U (<SHIFT> + u) several times to redo your fixes.
300+ --> Fiix the errors on thhis line and reeplace them witth undo.
309+=================================================================
311+=================================================================
313+ * Type w to select forward until the next word.
314+ * Type e to select to the end of the current word.
315+ * Type b to select backward to the start of the current word.
316+ * Use uppercase counterparts, W,E,B, to traverse WORDS.
318+ * Typing d deletes the entire selection, so you can delete a
319+ word forward by typing wd.
321+ * Type c to delete the selection and enter Insert mode.
323+ * Type a number before a motion to repeat it that many times.
325+ * Type x to select the entire current line. Type x again to
326+ select the next line.
328+ * Type u to undo. Type U to redo.
331+=================================================================
333+=================================================================
335+ Type C to duplicate the cursor to the next line.
337+ 1. Move the cursor to the first line below marked -->.
338+ 2. Type C to duplicate the cursor to the next line. Keys you
339+ press will now affect both cursors.
340+ 3. Use Insert mode to correct the lines. The two cursors will
341+ fix both lines simultaneously.
342+ 4. Type , to remove the second cursor.
344+ --> Fix th two nes at same ime.
345+ --> Fix th two nes at same ime.
347+ Fix these two lines at the same time.
353+=================================================================
354+= THE SELECT COMMAND =
355+=================================================================
357+ Type s to select matches in the selection.
359+ 1. Move the cursor to the line below marked -->.
360+ 2. Press x to select the line.
361+ 3. Press s. A prompt will appear.
362+ 4. Type 'apples' and press <ENTER>. Both occurrences of
363+ 'apples' in the line will be selected.
364+ 5. You can now press c and change 'apples' to something else,
366+ 6. Type , to remove the second cursor.
368+ --> I like to eat apples since my favorite fruit is apples.
375+=================================================================
376+= SELECTING VIA REGEX =
377+=================================================================
379+ The select command selects regular expressions, not just exact
380+ matches, allowing you to target more complex patterns.
382+ 1. Move the cursor to the line below marked -->.
383+ 2. Select the line with x and then press s.
384+ 3. Enter ' +' to select any amount of consecutive spaces >1.
385+ 4. Press c and change the matches to single spaces.
387+ --> This sentence has some extra spaces.
389+ Note: If you want to perform find-and-replace, the select
390+ command is the way to do it. Select the text you want
391+ to replace in — type % to select the whole file — and
392+ then perform the steps explained above.
397+=================================================================
398+= COLLAPSING SELECTIONS =
399+=================================================================
401+ Type ; to collapse selections to single cursors.
403+ Sometimes, you want to deselect without having to move the
404+ cursor(s). This can be done using the ; key.
406+ 1. Move the cursor to the line below marked -->.
408+ 2. Use the motions you have learned to move around the line,
409+ and try using ; to deselect the text after it is selected
412+ --> This is an error-free line with words to move around in.
231=================================================================
419=================================================================
232 This tutorial is still a work-in-progress.
420 This tutorial is still a work-in-progress.