diff --git a/runtime/tutor/tutor2 b/runtime/tutor/tutor2 index f41b7018cd..631b994452 100644 --- a/runtime/tutor/tutor2 +++ b/runtime/tutor/tutor2 @@ -6,7 +6,7 @@ Hic Sunt Dracones: if this is your first exposure to vim and you intended to avail yourself of the introductory chapter, kindly type - :q and try again. + :q! and run vimtutor for Chapter 1 instead. The approximate time required to complete this chapter is 8-10 minutes, depending upon how much time is spent with experimentation. @@ -23,14 +23,14 @@ MNEMONIC: into register(") named (a) (y)ank (i)nner (w)ord - 3. Navigate forward to the word 'cookie' (fk or 2fc or $2b or /co) + 3. Navigate forward to the word 'cookie' (fk or 2fc or $2b or /co) and type "byiw - 4. Navigate to any point on the word 'Vince' and type ciwa + 4. Navigate to any point on the word 'Vince' and type ciwa MNEMONIC: (c)hange (i)nner (w)ord with named (a) - 5. Navigate to any point on the word 'cake' and type ciwb + 5. Navigate to any point on the word 'cake' and type ciwb ---> a) Edward will henceforth be in charge of the cookie rations b) In this capacity, Vince will have sole cake discretionary powers @@ -40,8 +40,8 @@ NOTE: Delete also works into registers, i.e. "sdiw will delete the word under REFERENCE: Registers :h registers Named Registers :h quotea - Motion :h motion.txt /inner - CTRL-R :h insert /CTRL-R + Motion :h motion.txt /inner + CTRL-R :h insert /CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -54,10 +54,10 @@ REFERENCE: Registers :h registers 2. Navigate to any point on the supplied number - 3. Type ciw=60*60*24 + 3. Type ciw followed by =60*60*24 4. On the next line, enter insert mode and add today's date with - =system('date') + followed by =system('date') NOTE: All calls to system are OS dependent, e.g. on Windows use system('date /t') or :r!date /t @@ -79,7 +79,7 @@ REFERENCE: Expression Register :h quote= 1. Move the cursor to the line below marked ---> - 2. yank the zeroth line, then inspect registers with :reg + 2. yank the zeroth line, then inspect registers with :reg 3. delete line 0. with "cdd, then inspect registers (Where do you expect line 0 to be?) @@ -118,7 +118,7 @@ REFERENCE: Numbered Registers :h quote0 NOTE: a common conundrum when coding is moving around large chunks of code. The following technique helps avoid number line calculations associated with operations like "a147d or :945,1091d a or even worse using - i=1091-945 first + i followed by =1091-945 first 1. Move the cursor to the line below marked ---> @@ -172,9 +172,11 @@ REFERENCE: Marks :h marks 3. Change a whole word from anywhere within a word: ciw 4. Insert text directly from registers in insert mode: (C-r)a - 5. Insert the results of simple arithmetic operations: (C-r)=60*60 + 5. Insert the results of simple arithmetic operations: followed by + =60*60 in insert mode - 6. Insert the results of system calls: (C-r)=system('ls -1') + 6. Insert the results of system calls: followed by + =system('ls -1') in insert mode 7. Inspect registers with :reg