aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/tutor.txt208
1 files changed, 198 insertions, 10 deletions
diff --git a/runtime/tutor.txt b/runtime/tutor.txt
index 07b88884..b6f600d0 100644
--- a/runtime/tutor.txt
+++ b/runtime/tutor.txt
@@ -20,7 +20,6 @@ _________________________________________________________________
the first lesson.
-
=================================================================
= BASIC CURSOR MOVEMENT =
=================================================================
@@ -43,7 +42,6 @@ _________________________________________________________________
-
=================================================================
= EXITING HELIX =
=================================================================
@@ -66,7 +64,6 @@ _________________________________________________________________
-
=================================================================
= DELETION =
=================================================================
@@ -89,7 +86,6 @@ _________________________________________________________________
-
=================================================================
= INSERT MODE =
=================================================================
@@ -112,7 +108,6 @@ _________________________________________________________________
Note: The status bar will display your current mode.
Notice that when you press i, 'NOR' changes to 'INS'.
-
=================================================================
= MORE ON INSERT MODE =
=================================================================
@@ -123,7 +118,7 @@ _________________________________________________________________
Common examples of insertion commands include:
i - Insert before the selection.
- a - Insert after the selection. (a means "append")
+ a - Insert after the selection. (a means 'append')
I - Insert at the start of the line.
A - Insert at the end of the line.
@@ -135,7 +130,6 @@ _________________________________________________________________
--> This sentence is miss
This sentence is missing some text.
-
=================================================================
= SAVING A FILE =
=================================================================
@@ -158,7 +152,6 @@ _________________________________________________________________
-
=================================================================
= RECAP =
=================================================================
@@ -181,7 +174,6 @@ _________________________________________________________________
-
=================================================================
= MOTIONS AND SELECTIONS =
=================================================================
@@ -204,7 +196,6 @@ _________________________________________________________________
-
=================================================================
= MORE ON MOTIONS =
=================================================================
@@ -227,6 +218,203 @@ _________________________________________________________________
+=================================================================
+= THE CHANGE COMMAND =
+=================================================================
+
+ Press c to change the current selection.
+
+ The change command deletes the current selection and enters
+ Insert mode, so it is a very common shorthand for di.
+
+ 1. Move the cursor to the line below marked -->.
+ 2. Move to the start of an incorrect word and press w to
+ select it.
+ 3. Press c to delete the word and enter Insert mode.
+ 4. Type the correct word.
+ 5. Repeat until the line matches the line below it.
+
+ --> This paper has heavy words behind it.
+ This sentence has incorrect words in it.
+
+
+
+
+=================================================================
+= COUNTS WITH MOTIONS =
+=================================================================
+
+ Type a number before a motion to repeat it that many times.
+
+ 1. Move the cursor to the line below marked -->.
+
+ 2. Type 2w to move 2 words forward.
+
+ 3. Type 3e to move to the end of the third word forward.
+
+ 4. Type 2b to move 2 words backwards
+
+ 5. Try the above with different numbers.
+
+ --> This is just a line with words you can move around in.
+
+
+
+
+
+=================================================================
+= SELECTING LINES =
+=================================================================
+
+ Press x to select a whole line. Press again to select the next.
+
+ 1. Move the cursor to the second line below marked -->.
+ 2. Press x to select the line, and d to delete it.
+ 3. Move to the fourth line.
+ 4. Press x twice or type 2x to select 2 lines, and d to delete.
+
+ --> 1) Roses are red,
+ --> 2) Mud is fun,
+ --> 3) Violets are blue,
+ --> 4) I have a car,
+ --> 5) Clocks tell time,
+ --> 6) Sugar is sweet,
+ --> 7) And so are you.
+
+
+
+
+=================================================================
+= UNDOING =
+=================================================================
+
+ Type u to undo. Type U to redo.
+
+ 1. Move the cursor to the line below marked -->.
+ 2. Move to the first error, and press d to delete it.
+ 3. Type u to undo your deletion.
+ 4. Fix all the errors on the line.
+ 5. Type u several times to undo your fixes.
+ 6. Type U (<SHIFT> + u) several times to redo your fixes.
+
+ --> Fiix the errors on thhis line and reeplace them witth undo.
+
+
+
+
+
+
+
+
+=================================================================
+= RECAP =
+=================================================================
+
+ * Type w to select forward until the next word.
+ * Type e to select to the end of the current word.
+ * Type b to select backward to the start of the current word.
+ * Use uppercase counterparts, W,E,B, to traverse WORDS.
+
+ * Typing d deletes the entire selection, so you can delete a
+ word forward by typing wd.
+
+ * Type c to delete the selection and enter Insert mode.
+
+ * Type a number before a motion to repeat it that many times.
+
+ * Type x to select the entire current line. Type x again to
+ select the next line.
+
+ * Type u to undo. Type U to redo.
+
+
+=================================================================
+= MULTIPLE CURSORS =
+=================================================================
+
+ Type C to duplicate the cursor to the next line.
+
+ 1. Move the cursor to the first line below marked -->.
+ 2. Type C to duplicate the cursor to the next line. Keys you
+ press will now affect both cursors.
+ 3. Use Insert mode to correct the lines. The two cursors will
+ fix both lines simultaneously.
+ 4. Type , to remove the second cursor.
+
+ --> Fix th two nes at same ime.
+ --> Fix th two nes at same ime.
+
+ Fix these two lines at the same time.
+
+
+
+
+
+=================================================================
+= THE SELECT COMMAND =
+=================================================================
+
+ Type s to select matches in the selection.
+
+ 1. Move the cursor to the line below marked -->.
+ 2. Press x to select the line.
+ 3. Press s. A prompt will appear.
+ 4. Type 'apples' and press <ENTER>. Both occurrences of
+ 'apples' in the line will be selected.
+ 5. You can now press c and change 'apples' to something else,
+ like 'oranges'.
+ 6. Type , to remove the second cursor.
+
+ --> I like to eat apples since my favorite fruit is apples.
+
+
+
+
+
+
+=================================================================
+= SELECTING VIA REGEX =
+=================================================================
+
+ The select command selects regular expressions, not just exact
+ matches, allowing you to target more complex patterns.
+
+ 1. Move the cursor to the line below marked -->.
+ 2. Select the line with x and then press s.
+ 3. Enter ' +' to select any amount of consecutive spaces >1.
+ 4. Press c and change the matches to single spaces.
+
+ --> This sentence has some extra spaces.
+
+ Note: If you want to perform find-and-replace, the select
+ command is the way to do it. Select the text you want
+ to replace in — type % to select the whole file — and
+ then perform the steps explained above.
+
+
+
+
+=================================================================
+= COLLAPSING SELECTIONS =
+=================================================================
+
+ Type ; to collapse selections to single cursors.
+
+ Sometimes, you want to deselect without having to move the
+ cursor(s). This can be done using the ; key.
+
+ 1. Move the cursor to the line below marked -->.
+
+ 2. Use the motions you have learned to move around the line,
+ and try using ; to deselect the text after it is selected
+ by the motions.
+
+ --> This is an error-free line with words to move around in.
+
+
+
+
+
=================================================================
This tutorial is still a work-in-progress.