From c7f9caf6bd22557407da7ee81d7e68f02e9d94e3 Mon Sep 17 00:00:00 2001 From: n0s4 Date: Sat, 25 Jun 2022 21:09:11 +0100 Subject: [PATCH] Add REGISTERS, update MACROS accordingly --- runtime/tutor.txt | 90 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 67 insertions(+), 23 deletions(-) diff --git a/runtime/tutor.txt b/runtime/tutor.txt index 20c103b3b..85decf022 100644 --- a/runtime/tutor.txt +++ b/runtime/tutor.txt @@ -813,36 +813,36 @@ lines. ================================================================= -= 8.1 CHANGING CASE = += 8.1 REGISTERS = ================================================================= - Type ~ to switch the case of all selected letters. - Type ` to set all selected letters to lowercase. - Type Alt-` to set all selected letters to uppercase. + Registers are containers identified by a character for storing + things like yanked text. Registers are also used to store the + most recent search term as well as macros, which you'll learn + about in the next section. - 1. Move the cursor to the first line below marked -->. - 2. Select each wrongly capitalised or lowercase letter - and type ~ over them. - 3. Move to the second line marked -->. - 4. Type x to select the line. - 5. Type ` to change the line to lowercase. - 6. Move to the third line marked -->. - 7. Type x to select the line. - 8. Type Alt-` to change the line to uppercase. + Type " to select register . + + 1. Move the cursor to the line below marked -->. + 2. Type w to select "watermelons" and yank with y. + 3. Type w to select "bananas" + 4. Change to register b with "b and yank with y. + 5. Select "mangoes" and type R to replace it with "watermelons" + 6. Select "pineapples" then type "b R to replace with "bananas". + + --> I like watermelons and bananas because my favorite fruits + are mangoes and pineapples. - --> thIs sENtencE hAs MIS-cApitalIsed leTTerS. - --> this SENTENCE SHOULD all be in LOWERCASE. - --> THIS sentence should ALL BE IN uppercase! ================================================================= = 8.2 MACROS = ================================================================= Macros are a way to record a set of actions you want to repeat. - - Type Q to start recording a macro, you should see a popup at + You can also record macros to a specific register (default @). + Type Q to start recording a macro - you should see a popup at the bottom of your screen. Type Q again to stop recording. - Type q to repeat your recorded macro. + Type q to repeat the macro from register @ (the default). 1. Move the cursor to the first line below marked -->. Ensure your cursor is on the > of the arrow. @@ -858,14 +858,58 @@ lines. ================================================================= = CHAPTER 8 RECAP = +================================================================= + + * Type " to select a different register. + + * Type Q to start and stop recording a macro to a register, + the default being @. + + * Type q to replay a macro from @ or the selected register. + + + + + + + + + + + + +================================================================= += 9.1 CHANGING CASE = +================================================================= + + Type ~ to switch the case of all selected letters. + Type ` to set all selected letters to lowercase. + Type Alt-` to set all selected letters to uppercase. + + 1. Move the cursor to the first line below marked -->. + 2. Select each wrongly capitalised or lowercase letter + and type ~ over them. + 3. Move to the second line marked -->. + 4. Type x to select the line. + 5. Type ` to change the line to lowercase. + 6. Move to the third line marked -->. + 7. Type x to select the line. + 8. Type Alt-` to change the line to uppercase. + + --> thIs sENtencE hAs MIS-cApitalIsed leTTerS. + --> this SENTENCE SHOULD all be in LOWERCASE. + --> THIS sentence should ALL BE IN uppercase! + +================================================================= += CHAPTER 9 RECAP = ================================================================= * Type ~ to alternate case of selected letters. * Use ` and alt-` to set the case of selected layers to upper and lower respectively. - * Type Q to record and stop recording a macro. - * Type q to repeat the recorded macro. + + @@ -879,7 +923,7 @@ lines. ================================================================= -= 9.1 USING THE JUMPLIST = += 10.1 USING THE JUMPLIST = ================================================================= Helix can keep track of "jumps" which are big movements, like @@ -901,7 +945,7 @@ lines. ================================================================= -= CHAPTER 9 RECAP = += CHAPTER 10 RECAP = ================================================================= * Type C-s to save position to the jumplist.