You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 1, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: browser/src/Services/Learning/Tutorial/Tutorials/BeginningsAndEndingsTutorial.tsx
+12-4Lines changed: 12 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -34,13 +34,21 @@ export class BeginningsAndEndingsTutorial implements ITutorial {
34
34
newStages.MoveToGoalStage("Use '0' to move to the BEGINNING of the line",1,0),
35
35
newStages.SetBufferStage([Line1,Line2,Line3]),
36
36
newStages.MoveToGoalStage("Use `j` to move down to the next line",2),
37
-
newStages.MoveToGoalStage("Use '_' to move to the FIRST CHARACTER",2,4),
37
+
newStages.MoveToGoalStage(
38
+
"Use '_' to move to the FIRST NON-WHITESPACE CHARACTER",
39
+
2,
40
+
4,
41
+
),
38
42
newStages.MoveToGoalStage(
39
43
"Use '$' to move to the END of the line",
40
44
2,
41
45
Line3.length-1,
42
46
),
43
-
newStages.MoveToGoalStage("Use '_' to move to the FIRST CHARACTER",2,4),
47
+
newStages.MoveToGoalStage(
48
+
"Use '_' to move to the FIRST NON-WHITESPACE CHARACTER",
49
+
2,
50
+
4,
51
+
),
44
52
newStages.MoveToGoalStage("Use '0' to move to the BEGINNING of the line",2,0),
45
53
newStages.MoveToGoalStage(
46
54
"Use '$' to move to the END of the line",
@@ -53,9 +61,9 @@ export class BeginningsAndEndingsTutorial implements ITutorial {
53
61
publicgetmetadata(): ITutorialMetadata{
54
62
return{
55
63
id: "oni.tutorials.beginnings_and_endings",
56
-
name: "Motion: _, 0, $",
64
+
name: "Start/End Motion: _, 0, $",
57
65
description:
58
-
"You don't need to keep hitting `w` or `b` when you need to go all the way to the beginning or the end of a line. You can use the `0` key to move to the very beginning a line, and `$` to move to the end. Also, `_` moves to the first character in the line, which is often more convenient than `0`.",
66
+
"You don't need to keep hitting `w` or `b` when you need to go all the way to the beginning or the end of a line. You can use the `0` key to move to the very beginning a line, and `$` to move to the end. Also, `_` moves to the first non-whitespace character in the line, which is often more convenient than `0`.",
newStages.MoveToGoalStage("Move down a line",5,41),
67
+
newStages.MoveToGoalStage(
68
+
"Use ',' to move before the previous instance of 'e'",
69
+
5,
70
+
25,
71
+
),
72
+
newStages.MoveToGoalStage(
73
+
"Use ',' to move before the previous instance of 'e'",
74
+
5,
75
+
19,
76
+
),
77
+
newStages.MoveToGoalStage(
78
+
"Use ',' to move before the previous instance of 'e'",
79
+
5,
80
+
17,
81
+
),
82
+
newStages.MoveToGoalStage("Use ',' to move before the previous instance of 'e'",5,7),
48
83
]
49
84
}
50
85
51
86
publicgetmetadata(): ITutorialMetadata{
52
87
return{
53
88
id: "oni.tutorials.inline_finding",
54
-
name: "Motion: f, F, t, T",
89
+
name: "Character Find Motion: f, F, t, T",
55
90
description:
56
-
"Sometimes you need to move faster than 'h' and 'l' allow you to but need more control than 'w', 'e', and 'b', especially when using different operators. 'f' moves to a specific character to the right of the cursor, 'F' moves to a specific characterto the left, and ';' and ',' allow you to repeat these motions in different directions.",
91
+
"Sometimes you need to move faster than 'h' and 'l' allow but need more control than 'w', 'e', and 'b', especially when using the operators you'll learn later. 'f' followed by any character moves to the next instance of that character, 'F' followed by any character moves backwards to the next instance of that character. Similarly, 't' and 'T' move forwards and backwards up to (but not on) the specified character. After performing a 'f', 'F', 't', or 'T' operation ';' and ',' allow you to repeat those motions in different directions.",
Copy file name to clipboardExpand all lines: browser/src/Services/Learning/Tutorial/Tutorials/InsertAndUndoTutorial.tsx
+35-5Lines changed: 35 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
/**
2
2
* InsertAndUndoTutorial.tsx
3
3
*
4
-
* Tutorial that brings together moving and inserting
4
+
* Tutorial for undo and redo before we learn destructive changes
5
5
*/
6
6
7
7
import*asReactfrom"react"
@@ -64,15 +64,39 @@ export class InsertAndUndoTutorial implements ITutorial {
64
64
"There is some text msing this .",
65
65
TutorialLine1Correct,
66
66
]),
67
+
newStages.WaitForStateStage("Press 'u' to undo yet another change",[
68
+
"There is text msing this .",
69
+
TutorialLine1Correct,
70
+
]),
71
+
newStages.WaitForStateStage("Press 'Ctrl+r' to redo the last undo",[
72
+
"There is some text msing this .",
73
+
TutorialLine1Correct,
74
+
]),
75
+
newStages.WaitForStateStage("Press 'Ctrl+r' to redo the next undo",[
76
+
"There is some text missing this .",
77
+
TutorialLine1Correct,
78
+
]),
79
+
newStages.WaitForStateStage("Press 'Ctrl+r' to redo yet another undo",[
80
+
"There is some text missing from this .",
81
+
TutorialLine1Correct,
82
+
]),
83
+
newStages.WaitForStateStage("Press 'Ctrl+r' to redo yet another undo",[
84
+
"There is some text missing from this line.",
85
+
TutorialLine1Correct,
86
+
]),
87
+
newStages.WaitForStateStage("Press 'u' to undo the last change",[
88
+
"There is some text missing from this .",
89
+
TutorialLine1Correct,
90
+
]),
67
91
]
68
92
}
69
93
70
94
publicgetmetadata(): ITutorialMetadata{
71
95
return{
72
-
id: "oni.tutorial.insert_and_undo",
73
-
name: "Insert and Undo",
96
+
id: "oni.tutorial.undo_and_redo",
97
+
name: "Undo and Redo",
74
98
description:
75
-
"It's important to be able to switch between normal and insert mode, in order to edit text! Let's put together the cursor motion and insert mode from the previous tutorials. If you make any mistakes, you can undo inserted text with 'u'.",
99
+
"It's important to be able to switch between normal and insert mode, in order to edit text! Let's put together the cursor motion and insert mode from the previous tutorials. If you make any mistakes, you can undo inserted text with 'u'. To bring back an undo, hit 'Ctrl+r' to redo.",
76
100
level: 170,
77
101
}
78
102
}
@@ -82,6 +106,12 @@ export class InsertAndUndoTutorial implements ITutorial {
0 commit comments