on master help sign in
Continue tutor (#737)
4346592Omnikar
runtime/tutor.txt+198−10
@@ -20,7 +20,6 @@ _________________________________________________________________
20 the first lesson.
20 the first lesson.
21
21
22
22
23−
24=================================================================
23=================================================================
25= BASIC CURSOR MOVEMENT =
24= BASIC CURSOR MOVEMENT =
26=================================================================
25=================================================================
@@ -43,7 +42,6 @@ _________________________________________________________________
43
42
44
43
45
44
46−
47=================================================================
45=================================================================
48= EXITING HELIX =
46= EXITING HELIX =
49=================================================================
47=================================================================
@@ -66,7 +64,6 @@ _________________________________________________________________
66
64
67
65
68
66
69−
70=================================================================
67=================================================================
71= DELETION =
68= DELETION =
72=================================================================
69=================================================================
@@ -89,7 +86,6 @@ _________________________________________________________________
89
86
90
87
91
88
92−
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'.
114
110
115−
116=================================================================
111=================================================================
117= MORE ON INSERT MODE =
112= MORE ON INSERT MODE =
118=================================================================
113=================================================================
@@ -123,7 +118,7 @@ _________________________________________________________________
123
118
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.
129
124
@@ -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.
137
132
138−
139=================================================================
133=================================================================
140= SAVING A FILE =
134= SAVING A FILE =
141=================================================================
135=================================================================
@@ -158,7 +152,6 @@ _________________________________________________________________
158
152
159
153
160
154
161−
162=================================================================
155=================================================================
163= RECAP =
156= RECAP =
164=================================================================
157=================================================================
@@ -181,7 +174,6 @@ _________________________________________________________________
181
174
182
175
183
176
184−
185=================================================================
177=================================================================
186= MOTIONS AND SELECTIONS =
178= MOTIONS AND SELECTIONS =
187=================================================================
179=================================================================
@@ -204,7 +196,6 @@ _________________________________________________________________
204
196
205
197
206
198
207−
208=================================================================
199=================================================================
209= MORE ON MOTIONS =
200= MORE ON MOTIONS =
210=================================================================
201=================================================================
@@ -227,6 +218,203 @@ _________________________________________________________________
227
218
228
219
229
220
221+=================================================================
222+= THE CHANGE COMMAND =
223+=================================================================
224+
225+ Press c to change the current selection.
226+
227+ The change command deletes the current selection and enters
228+ Insert mode, so it is a very common shorthand for di.
229+
230+ 1. Move the cursor to the line below marked -->.
231+ 2. Move to the start of an incorrect word and press w to
232+ select it.
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.
236+
237+ --> This paper has heavy words behind it.
238+ This sentence has incorrect words in it.
239+
240+
241+
242+
243+=================================================================
244+= COUNTS WITH MOTIONS =
245+=================================================================
246+
247+ Type a number before a motion to repeat it that many times.
248+
249+ 1. Move the cursor to the line below marked -->.
250+
251+ 2. Type 2w to move 2 words forward.
252+
253+ 3. Type 3e to move to the end of the third word forward.
254+
255+ 4. Type 2b to move 2 words backwards
256+
257+ 5. Try the above with different numbers.
258+
259+ --> This is just a line with words you can move around in.
260+
261+
262+
263+
264+
265+=================================================================
266+= SELECTING LINES =
267+=================================================================
268+
269+ Press x to select a whole line. Press again to select the next.
270+
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.
275+
276+ --> 1) Roses are red,
277+ --> 2) Mud is fun,
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.
283+
284+
285+
286+
287+=================================================================
288+= UNDOING =
289+=================================================================
290+
291+ Type u to undo. Type U to redo.
292+
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.
299+
300+ --> Fiix the errors on thhis line and reeplace them witth undo.
301+
302+
303+
304+
305+
306+
307+
308+
309+=================================================================
310+= RECAP =
311+=================================================================
312+
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.
317+
318+ * Typing d deletes the entire selection, so you can delete a
319+ word forward by typing wd.
320+
321+ * Type c to delete the selection and enter Insert mode.
322+
323+ * Type a number before a motion to repeat it that many times.
324+
325+ * Type x to select the entire current line. Type x again to
326+ select the next line.
327+
328+ * Type u to undo. Type U to redo.
329+
330+
331+=================================================================
332+= MULTIPLE CURSORS =
333+=================================================================
334+
335+ Type C to duplicate the cursor to the next line.
336+
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.
343+
344+ --> Fix th two nes at same ime.
345+ --> Fix th two nes at same ime.
346+
347+ Fix these two lines at the same time.
348+
349+
350+
351+
352+
353+=================================================================
354+= THE SELECT COMMAND =
355+=================================================================
356+
357+ Type s to select matches in the selection.
358+
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,
365+ like 'oranges'.
366+ 6. Type , to remove the second cursor.
367+
368+ --> I like to eat apples since my favorite fruit is apples.
369+
370+
371+
372+
373+
374+
375+=================================================================
376+= SELECTING VIA REGEX =
377+=================================================================
378+
379+ The select command selects regular expressions, not just exact
380+ matches, allowing you to target more complex patterns.
381+
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.
386+
387+ --> This sentence has some extra spaces.
388+
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.
393+
394+
395+
396+
397+=================================================================
398+= COLLAPSING SELECTIONS =
399+=================================================================
400+
401+ Type ; to collapse selections to single cursors.
402+
403+ Sometimes, you want to deselect without having to move the
404+ cursor(s). This can be done using the ; key.
405+
406+ 1. Move the cursor to the line below marked -->.
407+
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
410+ by the motions.
411+
412+ --> This is an error-free line with words to move around in.
413+
414+
415+
416+
417+
230
418
231=================================================================
419=================================================================
232 This tutorial is still a work-in-progress.
420 This tutorial is still a work-in-progress.