@@ -12,7 +12,7 @@ _________________________________________________________________
1212 you might be used to in that it is modal, meaning that it has
1313 different modes for editing text. The primary modes you will
1414 use are Normal mode and Insert mode. While in Normal mode, the
15− keys you press won't actually type text. Instead, they will
15+ keys you type won't actually type text. Instead, they will
1616 perform various actions with the text. This allows for more
1717 efficient editing. This tutor will teach you how you can make
1818 use of Helix's modal editing features. To begin, ensure your
@@ -21,7 +21,7 @@ _________________________________________________________________
2121
2222
2323=================================================================
24−= BASIC CURSOR MOVEMENT =
24+= 1.1 BASIC CURSOR MOVEMENT =
2525=================================================================
2626
2727 ↑
@@ -43,18 +43,18 @@ _________________________________________________________________
4343
4444
4545=================================================================
46−= EXITING HELIX =
46+= 1.2 EXITING HELIX =
4747=================================================================
4848
49− 1. Press the : key to enter command mode. Your cursor will
49+ 1. Type : to enter command mode. Your cursor will
5050 move to the bottom of the screen.
51− 2. Type q or quit and press <ENTER> to exit Helix.
51+ 2. Type q or quit and type <ENTER> to exit Helix.
5252
5353 Note: The quit command will fail if there are unsaved changes.
54− To force quit and DISCARD these changes, use q! or quit!.
54+ To force quit and DISCARD these changes, type q! or quit!.
5555 You will learn how to save files later.
5656
57− To exit command mode without entering a command, press <ESC>.
57+ To exit command mode without entering a command, type <ESC>.
5858
5959 Now, move on to the next lesson.
6060
@@ -65,13 +65,13 @@ _________________________________________________________________
6565
6666
6767=================================================================
68−= DELETION =
68+= 1.3 DELETION =
6969=================================================================
7070
71− Press the d key to delete the character under the cursor.
71+ Type the d key to delete the character under the cursor.
7272
7373 1. Move the cursor to the line below marked -->.
74− 2. Move the cursor to each extra character, and press d to
74+ 2. Move the cursor to each extra character, and type d to
7575 delete it.
7676
7777 --> Thhiss senttencee haass exxtra charracterss.
@@ -87,16 +87,16 @@ _________________________________________________________________
8787
8888
8989=================================================================
90−= INSERT MODE =
90+= 1.4 INSERT MODE =
9191=================================================================
9292
93− Press the i key to enter Insert mode.
93+ Type the i key to enter Insert mode.
9494
9595 1. Move the cursor to the line below marked -->.
96− 2. Move to a place in the line which is missing text and press
97− i to enter Insert mode. Keys you press will now type text.
96+ 2. Move to a place in the line which is missing text and type
97+ i to enter Insert mode. Keys you type will now type text.
9898 3. Enter the missing text.
99− 4. Press <ESC> to exit Insert mode and return to Normal mode.
99+ 4. type <ESC> to exit Insert mode and return to Normal mode.
100100 5. Repeat until the line matches the line below it.
101101
102102 --> Th stce misg so.
@@ -106,13 +106,13 @@ _________________________________________________________________
106106 you may use the arrow keys instead of exiting and
107107 reentering Insert mode.
108108 Note: The status bar will display your current mode.
109− Notice that when you press i, 'NOR' changes to 'INS'.
109+ Notice that when you type i, 'NOR' changes to 'INS'.
110110
111111=================================================================
112−= MORE ON INSERT MODE =
112+= 1.5 MORE ON INSERT MODE =
113113=================================================================
114114
115− As you saw, you can press i to enter Insert mode at the current
115+ As you saw, you can type i to enter Insert mode at the current
116116 position of the cursor. There are a few other ways you can
117117 enter Insert mode at different locations.
118118
@@ -123,7 +123,7 @@ _________________________________________________________________
123123 A - Insert at the end of the line.
124124
125125 1. Move to anywhere in the line below marked -->.
126− 2. Press A (<SHIFT> + a), your cursor will move to the end of
126+ 2. Type A (<SHIFT> + a), your cursor will move to the end of
127127 the line and you will be able to type.
128128 3. Type the text necessary to match the line below.
129129
@@ -131,19 +131,19 @@ _________________________________________________________________
131131 This sentence is missing some text.
132132
133133=================================================================
134−= SAVING A FILE =
134+= 1.6 SAVING A FILE =
135135=================================================================
136136
137− Use :w/:write to save a file.
137+ Type :w/:write to save a file.
138138
139139 1. Exit Helix using :q! as explained before, or open a new
140140 terminal.
141141 2. Open a file in Helix by running: hx FILENAME
142142 3. Make some edits to the file.
143− 4. Press the : key to enter command mode.
144− 5. Type w or write, and press <ENTER> to save the file.
143+ 4. Type : to enter command mode.
144+ 5. Type w or write, and type <ENTER> to save the file.
145145
146− You can also use wq or write-quit to save and exit.
146+ You can also type wq or write-quit to save and exit.
147147
148148 Note: You can optionally enter a filepath after the w/write
149149 command in order to save to that path.
@@ -153,21 +153,21 @@ _________________________________________________________________
153153
154154
155155=================================================================
156−= RECAP =
156+= CHAPTER 1 RECAP =
157157=================================================================
158158
159159 * Use the h,j,k,l keys to move the cursor.
160160
161− * Press : to enter command mode.
161+ * Type : to enter command mode.
162162 * The q/quit and q!/quit! commands will exit Helix. The
163163 former fails when there are unsaved changes. The latter
164164 discards them.
165165 * The w/write command will save the file.
166166 * The wq/write-quit command will do both.
167167
168− * Press d to delete the character at the cursor.
168+ * Type d to delete the character at the cursor.
169169
170− * Press i to enter Insert mode and type text. Press <ESC> to
170+ * Type i to enter Insert mode and type text. Type <ESC> to
171171 return to Normal mode.
172172
173173
@@ -175,10 +175,10 @@ _________________________________________________________________
175175
176176
177177=================================================================
178−= MOTIONS AND SELECTIONS =
178+= 2.1 MOTIONS AND SELECTIONS =
179179=================================================================
180180
181− Press w to select forward until the next word.
181+ Type w to select forward until the next word.
182182
183183 The d key doesn't actually delete the character at the cursor,
184184 it deletes all selected text. Your cursor is like a
@@ -186,8 +186,8 @@ _________________________________________________________________
186186
187187 1. Move the cursor to the line below marked -->.
188188 2. Move to the beginning of a word that needs to be deleted.
189− 3. Press w to select until the beginning of the next word.
190− 4. Press d to delete the selection.
189+ 3. Type w to select until the beginning of the next word.
190+ 4. Type d to delete the selection.
191191 5. Repeat for all extra words in the line.
192192
193193 --> This sentence pencil has vacuum extra words in the it.
@@ -197,10 +197,10 @@ _________________________________________________________________
197197
198198
199199=================================================================
200−= MORE ON MOTIONS =
200+= 2.2 MORE ON MOTIONS =
201201=================================================================
202202
203− As you saw, pressing w moves the cursor forward until the start
203+ As you saw, typing w moves the cursor forward until the start
204204 of the next word, selecting the text traversed. This is useful
205205 for moving around text and for selecting text to operate on.
206206
@@ -219,18 +219,18 @@ _________________________________________________________________
219219
220220
221221=================================================================
222−= THE CHANGE COMMAND =
222+= 2.3 THE CHANGE COMMAND =
223223=================================================================
224224
225− Press c to change the current selection.
225+ Type c to change the current selection.
226226
227227 The change command deletes the current selection and enters
228228 Insert mode, so it is a very common shorthand for di.
229229
230230 1. Move the cursor to the line below marked -->.
231− 2. Move to the start of an incorrect word and press w to
231+ 2. Move to the start of an incorrect word and type w to
232232 select it.
233− 3. Press c to delete the word and enter Insert mode.
233+ 3. Type c to delete the word and enter Insert mode.
234234 4. Type the correct word.
235235 5. Repeat until the line matches the line below it.
236236
@@ -241,7 +241,7 @@ _________________________________________________________________
241241
242242
243243=================================================================
244−= COUNTS WITH MOTIONS =
244+= 2.4 COUNTS WITH MOTIONS =
245245=================================================================
246246
247247 Type a number before a motion to repeat it that many times.
@@ -263,15 +263,15 @@ _________________________________________________________________
263263
264264
265265=================================================================
266−= SELECTING LINES =
266+= 2.5 SELECTING LINES =
267267=================================================================
268268
269− Press x to select a whole line. Press again to select the next.
269+ Type x to select a whole line. Type x again to select the next.
270270
271271 1. Move the cursor to the second line below marked -->.
272− 2. Press x to select the line, and d to delete it.
272+ 2. Type x to select the line, and d to delete it.
273273 3. Move to the fourth line.
274− 4. Press x twice or type 2x to select 2 lines, and d to delete.
274+ 4. Type x twice or type 2x to select 2 lines, and d to delete.
275275
276276 --> 1) Roses are red,
277277 --> 2) Mud is fun,
@@ -285,13 +285,13 @@ _________________________________________________________________
285285
286286
287287=================================================================
288−= UNDOING =
288+= 2.6 UNDOING =
289289=================================================================
290290
291291 Type u to undo. Type U to redo.
292292
293293 1. Move the cursor to the line below marked -->.
294− 2. Move to the first error, and press d to delete it.
294+ 2. Move to the first error, and type d to delete it.
295295 3. Type u to undo your deletion.
296296 4. Fix all the errors on the line.
297297 5. Type u several times to undo your fixes.
@@ -307,7 +307,7 @@ _________________________________________________________________
307307
308308
309309=================================================================
310−= RECAP =
310+= CHAPTER 2 RECAP =
311311=================================================================
312312
313313 * Type w to select forward until the next word.
@@ -329,14 +329,14 @@ _________________________________________________________________
329329
330330
331331=================================================================
332−= MULTIPLE CURSORS =
332+= 3.1 MULTIPLE CURSORS =
333333=================================================================
334334
335335 Type C to duplicate the cursor to the next line.
336336
337337 1. Move the cursor to the first line below marked -->.
338338 2. Type C to duplicate the cursor to the next line. Keys you
339− press will now affect both cursors.
339+ type will now affect both cursors.
340340 3. Use Insert mode to correct the lines. The two cursors will
341341 fix both lines simultaneously.
342342 4. Type , to remove the second cursor.
@@ -346,22 +346,22 @@ _________________________________________________________________
346346
347347 Fix these two lines at the same time.
348348
349−
349+ Note: Type alt-C to do the same above the cursor.
350350
351351
352352
353353=================================================================
354−= THE SELECT COMMAND =
354+= 3.2 THE SELECT COMMAND =
355355=================================================================
356356
357357 Type s to select matches in the selection.
358358
359359 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
360+ 2. Type x to select the line.
361+ 3. Type s. A prompt will appear.
362+ 4. Type 'apples' and type <ENTER>. Both occurrences of
363363 'apples' in the line will be selected.
364− 5. You can now press c and change 'apples' to something else,
364+ 5. You can now type c and change 'apples' to something else,
365365 like 'oranges'.
366366 6. Type , to remove the second cursor.
367367
@@ -373,16 +373,16 @@ _________________________________________________________________
373373
374374
375375=================================================================
376−= SELECTING VIA REGEX =
376+= 3.3 SELECTING VIA REGEX =
377377=================================================================
378378
379379 The select command selects regular expressions, not just exact
380380 matches, allowing you to target more complex patterns.
381381
382382 1. Move the cursor to the line below marked -->.
383− 2. Select the line with x and then press s.
383+ 2. Select the line with x and then type s.
384384 3. Enter ' +' to select any amount of consecutive spaces >1.
385− 4. Press c and change the matches to single spaces.
385+ 4. Type c and change the matches to single spaces.
386386
387387 --> This sentence has some extra spaces.
388388
@@ -395,7 +395,7 @@ _________________________________________________________________
395395
396396
397397=================================================================
398−= COLLAPSING SELECTIONS =
398+= 3.4 COLLAPSING SELECTIONS =
399399=================================================================
400400
401401 Type ; to collapse selections to single cursors.
@@ -404,7 +404,6 @@ _________________________________________________________________
404404 cursor(s). This can be done using the ; key.
405405
406406 1. Move the cursor to the line below marked -->.
407−
408407 2. Use the motions you have learned to move around the line,
409408 and try using ; to deselect the text after it is selected
410409 by the motions.
@@ -416,6 +415,296 @@ _________________________________________________________________
416415
417416
418417
418+
419+=================================================================
420+= 3.5 SELECTING TO A CHARACTER =
421+=================================================================
422+
423+ Type f<ch> to select up to and including (find) a character.
424+ Type t<ch> to do the same, but not including (till) a character.
425+ Type uppercase F/T to do the same backwards.
426+
427+ 1. Move the cursor to the line below marked -->. Place the
428+ cursor on the first dash.
429+ 2. Type f[ to select to the square bracket.
430+ 3. Type d to delete your selection.
431+ 4. Go to the end of the line and repeat with F].
432+ 5. Move to the second line marked -->, just after the arrow.
433+ 6. Use t and T to delete the dashes around the sentence.
434+
435+ --> -----[Free this sentence of its brackets!]-----
436+ --> ------Free this sentence of its dashes!------
437+
438+ Note: Unlike Vim, Helix doesn't limit these commands to the
439+ current line. It searches for the character in the file.
440+
441+=================================================================
442+= CHAPTER 3 RECAP =
443+=================================================================
444+
445+ * Type C to copy the selection on the line below and Alt-C for
446+ above.
447+
448+ * Type s to select all instances of a regex pattern inside
449+ the current selection.
450+
451+ * Type semicolon ( ; ) to collapse selection.
452+
453+ * Type f / F to extend selection up to & including a character.
454+
455+ * Type t / T to extend selection until a character.
456+
457+
458+
459+
460+
461+
462+
463+=================================================================
464+= 4.1 COPYING AND PASTING TEXT =
465+=================================================================
466+
467+ Type y to yank (copy) the selection.
468+ Type p to paste the yanked selection after the cursor.
469+ Type P to paste the yanked text before the cursor.
470+
471+ 1. Move the cursor to the line below marked -->.
472+ Make sure your cursor is on the "b" of banana.
473+ 2. Type w to select "banana" and y to yank it.
474+ 3. Move to the space between "2" and "3" and type p to paste.
475+ 4. Repeat between "3" and "4".
476+
477+ --> 1 banana 2 3 4
478+ 1 banana 2 banana 3 banana 4
479+
480+ Note: Whenever you delete or change text, Helix will copy the
481+ altered text. Use alt-d/c instead to avoid this.
482+ Note: Helix doesn't share the system clipboard by default. Type
483+ space-y/p to yank/paste on your computer's main clipboard.
484+
485+=================================================================
486+= 4.2 CHANGING CASE =
487+=================================================================
488+
489+ Type ~ to switch the case of all selected letters.
490+ Type ` to set all selected letters to lowercase.
491+ Type Alt-` to set all selected letters to uppercase.
492+
493+ 1. Move the cursor to the first line below marked -->.
494+ 2. Select each wrongly capitalised or lowercase letter
495+ and type ~ over them.
496+ 3. Move to the second line marked -->.
497+ 4. Type x to select the line.
498+ 5. Type ` to change the line to lowercase.
499+ 6. Move to the third line marked -->.
500+ 7. Type x to select the line.
501+ 8. Type Alt-` to change the line to uppercase.
502+
503+ --> thIs sENtencE hAs MIS-cApitalIsed leTTerS.
504+ --> this SENTENCE SHOULD all be in LOWERCASE.
505+ --> THIS sentence should ALL BE IN uppercase!
506+
507+=================================================================
508+= 4.3 MACROS =
509+=================================================================
510+
511+ Macros are a way to record a set of actions you want to repeat.
512+
513+ Type Q to start recording a macro, you should see a popup at
514+ the bottom of your screen. Type Q again to stop recording.
515+ Type q to repeat your recorded macro.
516+
517+ 1. Move the cursor to the first line below marked -->.
518+ Ensure your cursor is on the > of the arrow.
519+ 2. Type Q to start recording.
520+ 3. Edit the line to look like the bottom one.
521+ 4. Exit insert and Type Q again to stop recording.
522+ 5. Move to the line below and put your cursor on the > again.
523+ 6. Type q to repeat the macro.
524+
525+ --> ... sentence doesn't have it's first and last ... .
526+ --> ... sentence doesn't have it's first and last ... .
527+ This sentence doesn't have it's first and last word.
528+
529+=================================================================
530+= CHAPTER 4 RECAP =
531+=================================================================
532+
533+ * Type y to yank (copy) text and p to paste.
534+ * Type space-Y and space-P to yank/paste on the system
535+ clipboard.
536+
537+ * Type ~ to alternate case of selected letters.
538+ * Use ` and alt-` to set the case of selected layers to
539+ upper and lower respectively.
540+
541+ * Type Q to record and stop recording a macro.
542+ * Type q to repeat the recorded macro.
543+
544+
545+
546+
547+
548+
549+
550+
551+=================================================================
552+= 5.1 USING THE JUMPLIST =
553+=================================================================
554+
555+ Helix can keep track of "jumps" which are big movements, like
556+ jumping to the definition of a function in code. It stores
557+ these in what's called the jumplist.
558+
559+ Type C-s (ctrl-s) to manually save your current position to
560+ the jumplist.
561+
562+ Type C-i and C-o to move forward and backwards in the jumplist
563+ respectively.
564+
565+ 1. Type C-s somewhere.
566+ 2. Move far away in the file.
567+ 3. Type C-o (just once!) to come back to where you saved.
568+
569+
570+
571+
572+
573+=================================================================
574+= 5.2 SEARCHING IN FILE =
575+=================================================================
576+
577+ Type / to search forward in file, enter to confirm search.
578+ Type n to go to the next search match.
579+ Type N to go to the previous search match.
580+
581+ 1. Type / and type in a common word, like 'banana'.
582+ 2. Type enter to confirm the search.
583+ 3. Use n and N to cycle through the matches.
584+
585+ Like the select command, searching also uses regex.
586+
587+ Note: To search backwards, type ? (shift-/).
588+
589+ Note: Unlike Vim, N doesn't change the search direction.
590+ N always goes backwards and n always goes forwards.
591+
592+
593+
594+
595+=================================================================
596+= CHAPTER 5 RECAP =
597+=================================================================
598+
599+ * Type C-s to save position to the jumplist.
600+ * Type C-i and C-o to go forward and backward in the jumplist.
601+
602+ * Type / to search forward in file, and ? to search backwards.
603+ * Use n and N to cycle through search matches.
604+
605+
606+
607+
608+
609+
610+
611+
612+
613+
614+
615+
616+
617+=================================================================
618+= 6.1 JOINING LINES =
619+=================================================================
620+
621+ Type J to join together lines in selection.
622+
623+ 1. Move the cursor to the line below marked -->.
624+ 2. Type J thrice or 3J to join the sentence to one line.
625+
626+ --> This line sentence
627+is spilling over
628+onto other
629+lines.
630+
631+ Note: J works on all lines in selection, so typing xxx or 3x to
632+ select the lines and then a single J will work the same.
633+
634+
635+
636+
637+
638+
639+=================================================================
640+= 6.2 INDENTING LINES =
641+=================================================================
642+
643+ Type > to indent a line and < to outdent it.
644+
645+ 1. Move the cursor to the line below marked -->.
646+ 2. Move down to the second line and type > to indent it.
647+ 3. Move to the third line and type < to unindent it.
648+
649+ --> These lines
650+ are indented
651+ very poorly.
652+
653+ These lines
654+ are indented
655+ much better.
656+
657+
658+
659+
660+
661+=================================================================
662+= 6.3 OPENING LINES =
663+=================================================================
664+
665+ Type o to add a newline and insert below the cursor.
666+ Type O to add a newline and insert above the cursor.
667+
668+ 1. Move the cursor to the line below marked -->.
669+ 2. Type o to open a line below and type your answer.
670+
671+ --> What is the best editor?
672+
673+
674+
675+
676+
677+
678+
679+
680+
681+
682+
683+=================================================================
684+= CHAPTER 6 RECAP =
685+=================================================================
686+
687+ * Type J to join lines within selection.
688+
689+ * Type > and < to indent and outdent selected lines.
690+
691+ * Use o and O to open lines.
692+
693+
694+
695+
696+
697+
698+
699+
700+
701+
702+
703+
704+
419705=================================================================
420706 This tutorial is still a work-in-progress.
421707 More sections are planned.
708+
709+
710+