on master help sign in
Continue tutor (#737)

* Add sections * `COUNTS WITH MOTIONS` * `SELECTING LINES` * `UNDOING` * Adjust lesson spacing to conform to page-wise scrolling Vertical length of lessons reduced by 1 line so that page-up and page-down move cleanly between lessons. * Add sections * `THE CHANGE COMMAND` * `RECAP` * `MULTIPLE CURSORS` * Fix height of `RECAP` section * Fix typo in `MULTIPLE CURSORS` * Add additional information about space mode to `MULTIPLE CURSORS` * Change `<SPACE><SPACE>` to `,` * Add sections * `THE SELECT COMMAND` * `SELECTING VIA REGEX` * `COLLAPSING SELECTIONS` * Fix quote inconsistency

commit43465926be77e6890203fe6a4942f674bfb2a8f4 authorOmnikar <omkar.subramaniam@icloud.com> dateFri 15 Oct 2021, 23:47 (5 years ago) parent6063ecf
1 file changed+198−10
runtime/tutor.txt+198−10
runtime/tutor.txt+198−10
@@ -20,7 +20,6 @@ _________________________________________________________________
2020 the first lesson.
2121
2222
23−
2423=================================================================
2524= BASIC CURSOR MOVEMENT =
2625=================================================================
@@ -43,7 +42,6 @@ _________________________________________________________________
4342
4443
4544
46−
4745=================================================================
4846= EXITING HELIX =
4947=================================================================
@@ -66,7 +64,6 @@ _________________________________________________________________
6664
6765
6866
69−
7067=================================================================
7168= DELETION =
7269=================================================================
@@ -89,7 +86,6 @@ _________________________________________________________________
8986
9087
9188
92−
9389=================================================================
9490= INSERT MODE =
9591=================================================================
@@ -112,7 +108,6 @@ _________________________________________________________________
112108 Note: The status bar will display your current mode.
113109 Notice that when you press i, 'NOR' changes to 'INS'.
114110
115−
116111=================================================================
117112= MORE ON INSERT MODE =
118113=================================================================
@@ -123,7 +118,7 @@ _________________________________________________________________
123118
124119 Common examples of insertion commands include:
125120 i - Insert before the selection.
126− a - Insert after the selection. (a means "append")
121+ a - Insert after the selection. (a means 'append')
127122 I - Insert at the start of the line.
128123 A - Insert at the end of the line.
129124
@@ -135,7 +130,6 @@ _________________________________________________________________
135130 --> This sentence is miss
136131 This sentence is missing some text.
137132
138−
139133=================================================================
140134= SAVING A FILE =
141135=================================================================
@@ -158,7 +152,6 @@ _________________________________________________________________
158152
159153
160154
161−
162155=================================================================
163156= RECAP =
164157=================================================================
@@ -181,7 +174,6 @@ _________________________________________________________________
181174
182175
183176
184−
185177=================================================================
186178= MOTIONS AND SELECTIONS =
187179=================================================================
@@ -204,7 +196,6 @@ _________________________________________________________________
204196
205197
206198
207−
208199=================================================================
209200= MORE ON MOTIONS =
210201=================================================================
@@ -227,6 +218,203 @@ _________________________________________________________________
227218
228219
229220
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+
230418
231419=================================================================
232420 This tutorial is still a work-in-progress.