diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2024-05-24 19:18:11 +0000 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2024-05-24 19:18:11 +0000 |
commit | ff7ed8f586589d620a806c3758fac4a47a8e7e15 (patch) | |
tree | 729bbcb92231538fa61dab6c3d890b025484b7f5 /runtime/tutor/en/vim-01-beginner.tutor | |
parent | 376914f419eb08fdf4c1a63a77e1f035898a0f10 (diff) | |
parent | 28c04948a1c887a1cc0cb64de79fa32631700466 (diff) | |
download | rneovim-ff7ed8f586589d620a806c3758fac4a47a8e7e15.tar.gz rneovim-ff7ed8f586589d620a806c3758fac4a47a8e7e15.tar.bz2 rneovim-ff7ed8f586589d620a806c3758fac4a47a8e7e15.zip |
Merge remote-tracking branch 'upstream/master' into mix_20240309
Diffstat (limited to 'runtime/tutor/en/vim-01-beginner.tutor')
-rw-r--r-- | runtime/tutor/en/vim-01-beginner.tutor | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/runtime/tutor/en/vim-01-beginner.tutor b/runtime/tutor/en/vim-01-beginner.tutor index c3decdef11..622eb7cc06 100644 --- a/runtime/tutor/en/vim-01-beginner.tutor +++ b/runtime/tutor/en/vim-01-beginner.tutor @@ -39,7 +39,7 @@ instead of text to type. Now, move to the next lesson (use the `j`{normal} key to scroll down). -## Lesson 1.1: MOVING THE CURSOR +# Lesson 1.1: MOVING THE CURSOR ** To move the cursor, press the `h`, `j`, `k`, `l` keys as indicated. ** @@ -87,7 +87,7 @@ NOTE: [:q!](:q) `<Enter>`{normal} discards any changes you made. In a few lesson 5. Move the cursor down to Lesson 1.3. -## Lesson 1.3: TEXT EDITING - DELETION +# Lesson 1.3: TEXT EDITING: DELETION ** Press `x`{normal} to delete the character under the cursor. ** @@ -251,8 +251,8 @@ The format for a delete command with the [d](d) delete operator is as follows: Thus typing `de`{normal} will delete from the cursor to the end of the word. -NOTE: Pressing just the motion while in Normal mode without an operator - will move the cursor as specified. +NOTE: Pressing just the motion while in Normal mode without an operator + will move the cursor as specified. # Lesson 2.4: USING A COUNT FOR A MOTION @@ -360,7 +360,7 @@ Fiix the errors oon thhis line and reeplace them witth undo. 7. To undo previous actions, type: `u`{normal} (lowercase u) To undo all the changes on a line, type: `U`{normal} (capital U) - To undo the undo's, type: `<C-r>`{normal} + To undo the undos, type: `<C-r>`{normal} # Lesson 3.1: THE PUT COMMAND @@ -381,7 +381,7 @@ b) Violets are blue, c) Intelligence is learned, a) Roses are red, -NOTE: You can also put the text before the cursor with `P`{normal} (capital P) +NOTE: You can also put the text before the cursor with `P`{normal} (capital P). # Lesson 3.2: THE REPLACE COMMAND @@ -508,7 +508,7 @@ NOTE: When the search reaches the end of the file it will continue at the # Lesson 4.3: MATCHING PARENTHESES SEARCH -** Type `%`{normal} to find a matching ),], or }. ** +** Type `%`{normal} to find a matching ), ], or }. ** 1. Place the cursor on any (, [, or { in the line below marked ✓. @@ -518,9 +518,9 @@ NOTE: When the search reaches the end of the file it will continue at the 4. Type `%`{normal} to move the cursor to the other matching bracket. - 5. Move the cursor to another (,),[,],{ or } and see what `%`{normal} does. + 5. Move the cursor to another (, ), [, ], {, or } and see what `%`{normal} does. -This ( is a test line with ('s, ['s ] and {'s } in it. )) +This ( is a test line with ('s, ['s, ] and {'s } in it. )) NOTE: This is very useful in debugging a program with unmatched parentheses! @@ -534,7 +534,7 @@ NOTE: This is very useful in debugging a program with unmatched parentheses! ~~~ cmd :s/thee/the/ ~~~ - NOTE: the [:s](:s) command only changed the first match of "thee" in the line. + NOTE: The [:s](:s) command only changed the first match of "thee" in the line. 3. Now type ~~~ cmd @@ -565,14 +565,14 @@ Usually thee best time to see thee flowers is in thee spring. to find every occurrence in the whole file, with a prompt whether to substitute or not. -NOTE: You can also select the lines you want to substitute first using visual-mode. +NOTE: You can also select the lines you want to substitute first using Visual mode. This will be explained more in a future lesson. # Lesson 4 SUMMARY 1. `<C-g>`{normal} displays your location and the file status. `G`{normal} moves to the end of the file. - number `G`{normal} moves to that line number. + number `G`{normal} moves to that line number. `gg`{normal} moves to the first line. 2. Typing `/`{normal} followed by a phrase searches FORWARD for the phrase. @@ -582,14 +582,14 @@ NOTE: You can also select the lines you want to substitute first using visual-mo `<C-o>`{normal} takes you back to older positions, `<C-i>`{normal} to newer positions. - 3. Typing `%`{normal} while the cursor is on a (,),[,],{, or } goes to its + 3. Typing `%`{normal} while the cursor is on a (, ), [, ], {, or } goes to its match. 4. To substitute new for the first old in a line type ~~~ cmd :s/old/new ~~~ - To substitute new for all 'old's on a line type + To substitute new for all olds on a line type ~~~ cmd :s/old/new/g ~~~ @@ -638,7 +638,7 @@ NOTE: All `:`{vim} commands are executed when you press `<Enter>`{normal}. ~~~ cmd :w TEST ~~~ - (where TEST is the filename you chose.) + (where TEST is the filename you chose.) 4. This saves the current file under the name TEST. To verify this, type `:!{unix:(ls),win:(dir)}`{vim} again to see your directory. @@ -667,7 +667,7 @@ NOTE: If you were to exit Neovim and start it again with `nvim TEST`, the file 4. Type - `:w TEST`{vim} + `w TEST`{vim} where TEST is a filename that does not exist yet. Verify that you see @@ -688,8 +688,8 @@ NOTE: Pressing [v](v) starts [Visual selection](visual-mode). You can move the c 1. Place the cursor just above this line. -NOTE: After executing Step 2 you will see text from Lesson 5.3. Then move - DOWN to see this lesson again. +NOTE: After executing Step 2 you will see text from Lesson 5.3. Then move + DOWN to see this lesson again. 2. Now retrieve your TEST file using the command @@ -762,7 +762,7 @@ Open up a line above this by typing O while the cursor is on this line. This li will allow you to pract appendi text to a line. This line will allow you to practice appending text to a line. -NOTE: [a](a), [i](i) and [A](A) all go to the same Insert mode, the only +NOTE: [a](a), [i](i), and [A](A) all go to the same Insert mode, the only difference is where the characters are inserted. # Lesson 6.3: ANOTHER WAY TO REPLACE @@ -810,9 +810,9 @@ NOTE: Replace mode is like Insert mode, but every typed character a) This is the first item. b) -NOTE: you can use `y`{normal} as an operator: `yw`{normal} yanks one word. +NOTE: You can use `y`{normal} as an operator: `yw`{normal} yanks one word. -NOTE: you can use `P`{normal} to put before the cursor, rather than after. +NOTE: You can use `P`{normal} to put before the cursor, rather than after. # Lesson 6.5: SET OPTION @@ -864,7 +864,7 @@ NOTE: If you want to ignore case for just one search command, use [\c](/\c) 4. The `y`{normal} operator copies text, `p`{normal} pastes it. 5. Typing a capital `R`{normal} enters Replace mode until `<Esc>`{normal} is - pressed. + pressed. 6. Typing "[:set](:set) xxx" sets the option "xxx". Some options are: @@ -872,7 +872,7 @@ NOTE: If you want to ignore case for just one search command, use [\c](/\c) 'is' 'incsearch' show partial matches for a search phrase 'hls' 'hlsearch' highlight all matching phrases - You can either use the long or the short option name. + You can either use the long or the short option name. 7. Prepend "no" to switch an option off: ~~~ cmd @@ -921,8 +921,8 @@ To start using more features create an "init.vim" file. `:w`{vim} - You can add all your preferred settings to this "init.vim" file. - For more information type `:help init.vim`{vim}. +You can add all your preferred settings to this "init.vim" file. +For more information type `:help init.vim`{vim}. # Lesson 7.3: COMPLETION |