on master help sign in
tutor: Normalize key names, capitalization, etc.
commit5077ce76b3d767ca4c11f8149d4fa4ad60fbb57d authorTim Siegel <siegeltr@gmail.com> dateMon 10 Oct 2022, 15:36 (4 years ago) parent425df93
1 file changed+68−72
runtime/tutor+68−72
runtime/tutor+68−72
@@ -16,7 +16,7 @@ _________________________________________________________________
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
19− caps-lock key is not pressed and hold the j key until you reach
19+ CapsLock key is not pressed and hold the j key until you reach
2020 the first lesson.
2121
2222
@@ -31,7 +31,7 @@ _________________________________________________________________
3131 ↓
3232
3333 The cursor can be moved using the h, j, k, l keys, as shown
34− above. The cursor/arrow keys will also work, but it is faster
34+ above. The cursor / arrow keys will also work, but it is faster
3535 to use the hjkl keys as they are closer to the other keys you
3636 will be using. Try moving around to get a feel for hjkl.
3737 Once you're ready, hold j to continue to the next lesson.
@@ -48,13 +48,13 @@ _________________________________________________________________
4848
4949 1. Type : to enter Command mode. Your cursor will
5050 move to the bottom of the screen.
51− 2. Type q or quit and type <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.
5454 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, type <ESC>.
57+ To exit Command mode without entering a command, type Escape.
5858
5959 Now, move on to the next lesson.
6060
@@ -96,7 +96,7 @@ _________________________________________________________________
9696 2. Move to a place in the line which is missing text and type
9797 i to enter Insert mode. Keys you type will now type text.
9898 3. Enter the missing text.
99− 4. type <ESC> to exit Insert mode and return to Normal mode.
99+ 4. type Escape 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.
@@ -112,18 +112,18 @@ _________________________________________________________________
112112= 1.5 SAVING A FILE =
113113=================================================================
114114
115− Type :w/:write to save a file.
115+ Type :w / :write to save a file.
116116
117117 1. Exit Helix using :q! as explained before, or open a new
118118 terminal.
119119 2. Open a file in Helix by running: hx FILENAME
120120 3. Make some edits to the file.
121121 4. Type : to enter Command mode.
122− 5. Type w or write, and type <ENTER> to save the file.
122+ 5. Type w or write, and type Enter to save the file.
123123
124124 You can also type wq or write-quit to save and exit.
125125
126− Note: You can optionally enter a filepath after the w/write
126+ Note: You can optionally enter a filepath after the w / write
127127 command in order to save to that path.
128128 Note: If there are any unsaved changes to a file, a plus [+]
129129 will appear next to the file name in the status bar.
@@ -137,15 +137,15 @@ _________________________________________________________________
137137 * Use the h,j,k,l keys to move the cursor.
138138
139139 * Type : to enter Command mode.
140− * The q/quit and q!/quit! commands will exit Helix. The
140+ * The q / quit and q! / quit! commands will exit Helix. The
141141 former fails when there are unsaved changes. The latter
142142 discards them.
143− * The w/write command will save the file.
144− * The wq/write-quit command will do both.
143+ * The w / write command will save the file.
144+ * The wq / write-quit command will do both.
145145
146146 * Type d to delete the character at the cursor.
147147
148− * Type i to enter Insert mode and type text. Type <ESC> to
148+ * Type i to enter Insert mode and type text. Type Escape to
149149 return to Normal mode.
150150
151151
@@ -167,7 +167,7 @@ _________________________________________________________________
167167 A - Insert at the end of the line.
168168
169169 1. Move to anywhere in the line marked '-->' below.
170− 2. Type A (<SHIFT> + a), your cursor will move to the end of
170+ 2. Type A (Shift-a), your cursor will move to the end of
171171 the line and you will be able to type.
172172 3. Type the text necessary to match the line below.
173173
@@ -207,7 +207,7 @@ _________________________________________________________________
207207
208208 * Type A to enter Insert mode at the end of a line.
209209
210− * Use o and O to open lines below/above the cursor respectively.
210+ * Use o and O to open lines below and above the cursor respectively.
211211
212212
213213
@@ -307,11 +307,11 @@ _________________________________________________________________
307307
308308
309309=================================================================
310−= 3.5 SELECT/EXTEND MODE =
310+= 3.5 SELECT / EXTEND MODE =
311311=================================================================
312312
313313 Type v to enter Select mode.
314− Type v again or <ESC> to return to Normal mode
314+ Type v again or Escape to return to Normal mode
315315 In Select mode every movement will extend the selection, as
316316 opposed to replacing it.
317317
@@ -366,8 +366,8 @@ _________________________________________________________________
366366
367367 --> This is an error-free line with words to move around in.
368368
369− Note: This works the same in select mode.
370− Note: Another related command is A-; which flips selections.
369+ Note: This works the same in Select mode.
370+ Note: Another related command is Alt-; which flips selections.
371371
372372
373373
@@ -405,7 +405,7 @@ _________________________________________________________________
405405 3. Type u to undo your deletion.
406406 4. Fix all the errors on the line.
407407 5. Type u several times to undo your fixes.
408− 6. Type U (<SHIFT> + u) several times to redo your fixes.
408+ 6. Type U (Shift-u) several times to redo your fixes.
409409
410410 --> Fiix the errors on thhis line and reeplace them witth undo.
411411
@@ -434,34 +434,32 @@ _________________________________________________________________
434434 1 banana 2 banana 3 banana 4
435435
436436 Note: Whenever you delete or change text, Helix will copy the
437− altered text. Use alt-d/c instead to avoid this.
437+ altered text. Use Alt-d / Alt-c instead to avoid this.
438438 Note: Helix doesn't share the system clipboard by default. Type
439− space-y/p to yank/paste on your computer's main clipboard.
439+ Space + y / p to yank / paste on the system's clipboard.
440440
441441=================================================================
442442= 4.3 SEARCHING IN FILE =
443443=================================================================
444444
445− Type / to search forward in file, enter to confirm search.
445+ Type / to search forward in file, Enter to confirm search.
446446 Type n to go to the next search match.
447447 Type N to go to the previous search match.
448448
449449 1. Type / and type in a common word, like 'banana'.
450− 2. Type enter to confirm the search.
450+ 2. Type Enter to confirm the search.
451451 3. Use n and N to cycle through the matches.
452452
453453 Searching uses regular expressions, allowing you to target more
454454 complex expressions, which you'll learn about in the lesson on
455455 the select command.
456456
457− Note: To search backwards, type ? (shift-/).
457+ Note: To search backwards, type ? (Shift-/).
458458 Note: Unlike Vim, ? doesn't change the search direction.
459459 N always goes backwards and n always goes forwards.
460460
461461
462462
463−
464−
465463=================================================================
466464= CHAPTER 4 RECAP =
467465=================================================================
@@ -469,7 +467,7 @@ _________________________________________________________________
469467 * Type u to undo. Type U to redo.
470468
471469 * Type y to yank (copy) text and p to paste.
472− * Use space-Y and space-P to yank/paste on the system
470+ * Use Space + y and Space + p to yank / paste on the system
473471 clipboard.
474472
475473 * Type / to search forward in file, and ? to search backwards.
@@ -490,8 +488,8 @@ _________________________________________________________________
490488
491489 Type C to duplicate the cursor to the next suitable line.
492490
493− 1. Move the cursor to the first line below marked -->. Place
494− the cursor on the first word.
491+ 1. Move the cursor to the first line marked '-->' below. Place
492+ the cursor somewhere past the '-->'.
495493 2. Type C to duplicate the cursor to the next suitable line.
496494 Notice how it skips the line in the middle. Keys you type
497495 will now affect both cursors.
@@ -502,10 +500,9 @@ _________________________________________________________________
502500 --> Fix th two nes at same ime.
503501 -->
504502 --> Fix th two nes at same ime.
505−
506503 Fix these two lines at the same time.
507504
508− Note: Type alt-C to do the same above the cursor.
505+ Note: Type Alt-C to do the same above the cursor.
509506
510507=================================================================
511508= 5.2 THE SELECT COMMAND =
@@ -516,11 +513,11 @@ _________________________________________________________________
516513 1. Move the cursor to the line marked '-->' below.
517514 2. Type x to select the line.
518515 3. Type s. A prompt will appear.
519− 4. Type 'apples' and type <ENTER>. Both occurrences of
516+ 4. Type 'apples' and type Enter. Both occurrences of
520517 'apples' in the line will be selected.
521518 5. You can now type c and change 'apples' to something else,
522519 like 'oranges'.
523− 6. Type <ESC> to exit Insert mode.
520+ 6. Type Escape to exit Insert mode.
524521 7. Type , to remove the second cursor.
525522
526523 --> I like to eat apples since my favorite fruit is apples.
@@ -577,11 +574,11 @@ _________________________________________________________________
577574= 5.5 SPLIT SELECTION INTO LINES =
578575=================================================================
579576
580− Type A-s (Alt-s) to split the selection(s) on newlines.
577+ Type Alt-s to split the selection(s) on newlines.
581578
582579 1. Move the cursor to the first row of the table below.
583580 2. Select the entire table with 6x.
584− 3. Type A-s to split into selections at each line.
581+ 3. Type Alt-s to split into selections at each line.
585582 4. Align the table with &.
586583
587584 | FRUIT | AMOUNT |
@@ -607,7 +604,7 @@ _________________________________________________________________
607604
608605 * Type & to align selections.
609606
610− * Type A-s to split the selection into lines.
607+ * Type Alt-s to split the selection into lines.
611608
612609
613610
@@ -630,7 +627,7 @@ _________________________________________________________________
630627 2. Type f[ to select to the square bracket.
631628 3. Type d to delete your selection.
632629 4. Go to the end of the line and repeat with F].
633− 5. Move to the second line marked -->, just after the arrow.
630+ 5. Move to the second line marked '-->', just after the arrow.
634631 6. Use t and T to delete the dashes around the sentence.
635632
636633 --> -----[Free this sentence of its brackets!]-----
@@ -666,16 +663,16 @@ _________________________________________________________________
666663=================================================================
667664
668665 Type . to repeat the last insert command.
669− Type A-. to repeat the last f / t selection.
666+ Type Alt-. to repeat the last f / t selection.
670667
671668 1. Move the cursor to the line marked '-->' below.
672669 2. Make a change, insertion or appendage and repeat it with . .
673− 3. Try using A-. with f and t, to select multiple sentences for
674− instance.
670+ 3. Try using Alt-. with f and t, to select multiple sentences
671+ for instance.
675672
676673 --> This is some text for you to repeat things. You can repeat
677− insertions like changing words, or repeat selections like f/t.
678−
674+ insertions like changing words, or repeat selections like
675+ f / t.
679676
680677
681678
@@ -693,7 +690,7 @@ _________________________________________________________________
693690 * Type r to replace selected characters.
694691
695692 * Type . to repeat the last insertion.
696− * Type A-. to repeat the last f / t selection.
693+ * Type Alt-. to repeat the last f / t selection.
697694
698695
699696
@@ -775,13 +772,13 @@ lines.
775772= 7.4 INCREMENTING AND DECREMENTING =
776773=================================================================
777774
778− Type C-a to increment the number under selection.
779− Type C-x to decrement the number under selection.
775+ Type Ctrl-a to increment the number under selection.
776+ Type Ctrl-x to decrement the number under selection.
780777
781778 1. Move the cursor to the third line marked '-->' below.
782− 2. Type C-a to increment the second point marked 2.
779+ 2. Type Ctrl-a to increment the second point marked 2.
783780 3. Repeat for the point marked 3.
784− 4. Move to the last point and type C-x to decrement the 6.
781+ 4. Move to the last point and type Ctrl-x to decrement the 6.
785782
786783 --> 1) First point.
787784 --> 2) Added point.
@@ -803,8 +800,8 @@ lines.
803800
804801 * Type < and > to indent / outdent lines.
805802
806− * Type C-a to increment the selected number.
807− * Type C-x to decrement the selected number.
803+ * Type Ctrl-a to increment the selected number.
804+ * Type Ctrl-x to decrement the selected number.
808805
809806
810807
@@ -903,18 +900,17 @@ lines.
903900 Note: * is like a shorthand for "/ y as all it really does is
904901 copy the selection into the / register.
905902
906−
907903=================================================================
908904= 9.2 ADDING SELECTION ON NEXT SEARCH MATCH =
909905=================================================================
910906
911− A property of select mode (v) when using n and N is that instead
907+ A property of Select mode (v) when using n and N is that instead
912908 of moving the selection to the next match, it adds a new
913909 selection on each match.
914910
915911 1. Move the cursor to the line marked '-->' below.
916912 2. Select the first "bat" and type * to set it to search.
917− 3. Type v to enter select mode.
913+ 3. Type v to enter Select mode.
918914 4. Type n to select the other "bat".
919915 5. Use c or r to change the "bat"s to "cat".
920916
@@ -934,15 +930,15 @@ lines.
934930 searching or jumping to the definition of a function in code. It
935931 stores these in what's called the jumplist.
936932
937− Type C-s (ctrl-s) to manually save your current position to
933+ Type Ctrl-s to manually save your current position to
938934 the jumplist.
939935
940− Type C-i ("in") and C-o ("out") to move forward and backwards in
941− the jumplist respectively.
936+ Type Ctrl-i ("in") and Ctrl-o ("out") to move forward and
937+ backwards in the jumplist respectively.
942938
943− 1. Type C-s somewhere.
939+ 1. Type Ctrl-s somewhere.
944940 2. Move far away in the file.
945− 3. Type C-o (just once!) to come back to where you saved.
941+ 3. Type Ctrl-o (just once!) to come back to where you saved.
946942
947943
948944
@@ -954,12 +950,12 @@ lines.
954950
955951 * Type * to set the search register to the primary selection.
956952
957− * Type n / N in visual mode to add selections on each search
953+ * Type n / N in Visual mode to add selections on each search
958954 match.
959955
960− * Type C-s to save position to the jumplist.
961− * Type C-i and C-o to go forward and backward in the jumplist.
962−
956+ * Type Ctrl-s to save position to the jumplist.
957+ * Type Ctrl-i and Ctrl-o to go forward and backward in the
958+ jumplist.
963959
964960
965961
@@ -977,20 +973,20 @@ lines.
977973 Type ) and ( to cycle the primary selection forward and backward
978974 through selections respectively.
979975
980− Type A-, to remove the primary selection.
976+ Type Alt-, to remove the primary selection.
981977
982978 1. Move the cursor to the line marked '-->' below.
983979 2. Select both lines with xx or 2x.
984980 3. Type s to select, type "would" and enter.
985981 4. Use ( and ) to cycle the primary selection and remove the
986− very second "would" with A-, .
982+ very second "would" with Alt-, .
987983 5. Type c "wood" to change the remaining "would"s to "wood".
988984
989985 --> How much would would a wouldchuck chuck
990986 --> if a wouldchuck could chuck would?
991987
992− Note: Additionally, A-( and A-) cycle the *contents* of the
993− selections.
988+ Note: Additionally, Alt-( and Alt-) cycle the *contents* of the
989+ selections as well.
994990
995991=================================================================
996992= 10.2 CHANGING CASE =
@@ -1003,10 +999,10 @@ lines.
1003999 1. Move the cursor to the first line marked '-->' below.
10041000 2. Select each wrongly capitalised or lowercase letter
10051001 and type ~ over them.
1006− 3. Move to the second line marked -->.
1002+ 3. Move to the second line marked '-->'.
10071003 4. Type x to select the line.
10081004 5. Type ` to change the line to lowercase.
1009− 6. Move to the third line marked -->.
1005+ 6. Move to the third line marked '-->'.
10101006 7. Type x to select the line.
10111007 8. Type Alt-` to change the line to uppercase.
10121008
@@ -1022,13 +1018,13 @@ lines.
10221018
10231019 1. Move the cursor to the line under ---.
10241020 2. Type xx / 2x to select the lines.
1025− 3. Type S then \. |! <enter> (note the spaces after . and !).
1021+ 3. Type S then \. |! Enter (note the spaces after . and !).
10261022 This effectively splits the selection into sentences at each
10271023 dot or exclamation mark.
1028− 4. Type A-; to reverse the selections.
1024+ 4. Type Alt-; to reverse the selections.
10291025 5. Type ; to reduce selections to a single character - the first
10301026 letter of each sentence.
1031− 6. Type A-` to convert all selected letters to uppercase.
1027+ 6. Type Alt-` to convert all selected letters to uppercase.
10321028
10331029---
10341030these are sentences. some sentences don't start with uppercase
@@ -1042,10 +1038,10 @@ letters! that is not good grammar. you can fix this.
10421038
10431039 * Use ) and ( to cycle the primary selection back and forward
10441040 through selections respectively.
1045− * Type A-, to remove the primary selection.
1041+ * Type Alt-, to remove the primary selection.
10461042
10471043 * Type ~ to alternate case of selected letters.
1048− * Use ` and A-` to set the case of selected letters to
1044+ * Use ` and Alt-` to set the case of selected letters to
10491045 upper and lower respectively.
10501046
10511047 * Type S to split selections on regex.