mirror of
https://github.com/vim/vim
synced 2025-07-16 01:01:58 +00:00
Update runtime files.
This commit is contained in:
@ -19,7 +19,7 @@
|
||||
properly. If you only read the text, you will forget the commands!
|
||||
|
||||
Now, make sure that your Caps-Lock key is NOT depressed and press
|
||||
the j key enough times to move the cursor so that Lesson 1.1
|
||||
the j key enough times to move the cursor so that lesson 1.1
|
||||
completely fills the screen.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lesson 1.1: MOVING THE CURSOR
|
||||
@ -36,7 +36,7 @@
|
||||
2. Hold down the down key (j) until it repeats.
|
||||
Now you know how to move to the next lesson.
|
||||
|
||||
3. Using the down key, move to Lesson 1.2.
|
||||
3. Using the down key, move to lesson 1.2.
|
||||
|
||||
NOTE: If you are ever unsure about something you typed, press <ESC> to place
|
||||
you in Normal mode. Then retype the command you wanted.
|
||||
@ -64,7 +64,7 @@ NOTE: The cursor keys should also work. But using hjkl you will be able to
|
||||
NOTE: :q! <ENTER> discards any changes you made. In a few lessons you
|
||||
will learn how to save the changes to a file.
|
||||
|
||||
5. Move the cursor down to Lesson 1.3.
|
||||
5. Move the cursor down to lesson 1.3.
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@ -84,7 +84,7 @@ NOTE: :q! <ENTER> discards any changes you made. In a few lessons you
|
||||
|
||||
---> The ccow jumpedd ovverr thhe mooon.
|
||||
|
||||
5. Now that the line is correct, go on to Lesson 1.4.
|
||||
5. Now that the line is correct, go on to lesson 1.4.
|
||||
|
||||
NOTE: As you go through this tutor, do not try to memorize, learn by usage.
|
||||
|
||||
@ -126,7 +126,7 @@ NOTE: As you go through this tutor, do not try to memorize, learn by usage.
|
||||
|
||||
3. As the text has been appended press <ESC> to return to Normal mode.
|
||||
|
||||
4. Move the cursor to the second line marked ---> and repeat
|
||||
4. Move the cursor to the second line marked ---> and repeat
|
||||
steps 2 and 3 to correct this sentence.
|
||||
|
||||
---> There is some text missing from th
|
||||
@ -152,13 +152,13 @@ NOTE: As you go through this tutor, do not try to memorize, learn by usage.
|
||||
|
||||
3. Insert and delete text as you learned in the previous lessons.
|
||||
|
||||
4. Save the file with changes and exit Vim with: :wq <ENTER>
|
||||
4. Save the file with changes and exit Vim with: :wq <ENTER>
|
||||
|
||||
5. If you have quit vimtutor in step 1 restart the vimtutor and move down to
|
||||
the following summary.
|
||||
|
||||
6. After reading the above steps and understanding them: do it.
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lesson 1 SUMMARY
|
||||
|
||||
@ -180,7 +180,7 @@ NOTE: As you go through this tutor, do not try to memorize, learn by usage.
|
||||
NOTE: Pressing <ESC> will place you in Normal mode or will cancel
|
||||
an unwanted and partially completed command.
|
||||
|
||||
Now continue with Lesson 2.
|
||||
Now continue with lesson 2.
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lesson 2.1: DELETION COMMANDS
|
||||
@ -202,7 +202,7 @@ Now continue with Lesson 2.
|
||||
|
||||
---> There are a some words fun that don't belong paper in this sentence.
|
||||
|
||||
5. Repeat steps 3 and 4 until the sentence is correct and go to Lesson 2.2.
|
||||
5. Repeat steps 3 and 4 until the sentence is correct and go to lesson 2.2.
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@ -222,7 +222,7 @@ Now continue with Lesson 2.
|
||||
---> Somebody typed the end of this line twice. end of this line twice.
|
||||
|
||||
|
||||
5. Move on to Lesson 2.3 to understand what is happening.
|
||||
5. Move on to lesson 2.3 to understand what is happening.
|
||||
|
||||
|
||||
|
||||
@ -257,7 +257,7 @@ NOTE: Pressing just the motion while in Normal mode without an operator will
|
||||
|
||||
** Typing a number before a motion repeats it that many times. **
|
||||
|
||||
1. Move the cursor to the start of the line marked ---> below.
|
||||
1. Move the cursor to the start of the line below marked --->.
|
||||
|
||||
2. Type 2w to move the cursor two words forward.
|
||||
|
||||
@ -269,7 +269,7 @@ NOTE: Pressing just the motion while in Normal mode without an operator will
|
||||
|
||||
---> This is just a line with words you can move around in.
|
||||
|
||||
6. Move on to Lesson 2.5.
|
||||
6. Move on to lesson 2.5.
|
||||
|
||||
|
||||
|
||||
@ -286,10 +286,10 @@ NOTE: Pressing just the motion while in Normal mode without an operator will
|
||||
|
||||
1. Move the cursor to the first UPPER CASE word in the line marked --->.
|
||||
|
||||
2. Type d2w to delete the two UPPER CASE words
|
||||
2. Type d2w to delete the two UPPER CASE words.
|
||||
|
||||
3. Repeat steps 1 and 2 with a different count to delete the consecutive
|
||||
UPPER CASE words with one command
|
||||
UPPER CASE words with one command.
|
||||
|
||||
---> this ABC DE line FGHI JK LMN OP of words is Q RS TUV cleaned up.
|
||||
|
||||
@ -338,7 +338,7 @@ NOTE: Pressing just the motion while in Normal mode without an operator will
|
||||
|
||||
---> Fiix the errors oon thhis line and reeplace them witth undo.
|
||||
|
||||
8. These are very useful commands. Now move on to the Lesson 2 Summary.
|
||||
8. These are very useful commands. Now move on to the lesson 2 Summary.
|
||||
|
||||
|
||||
|
||||
@ -372,7 +372,7 @@ NOTE: Pressing just the motion while in Normal mode without an operator will
|
||||
|
||||
** Type p to put previously deleted text after the cursor. **
|
||||
|
||||
1. Move the cursor to the first ---> line below.
|
||||
1. Move the cursor to the first line below marked --->.
|
||||
|
||||
2. Type dd to delete the line and store it in a Vim register.
|
||||
|
||||
@ -406,7 +406,7 @@ NOTE: Pressing just the motion while in Normal mode without an operator will
|
||||
---> Whan this lime was tuoed in, someone presswd some wrojg keys!
|
||||
---> When this line was typed in, someone pressed some wrong keys!
|
||||
|
||||
5. Now move on to Lesson 3.3.
|
||||
5. Now move on to lesson 3.3.
|
||||
|
||||
NOTE: Remember that you should be learning by doing, not memorization.
|
||||
|
||||
@ -447,7 +447,7 @@ Notice that ce deletes the word and places you in Insert mode.
|
||||
|
||||
2. The motions are the same, such as w (word) and $ (end of line).
|
||||
|
||||
3. Move to the first line below marked --->.
|
||||
3. Move the cursor to the first line below marked --->.
|
||||
|
||||
4. Move the cursor to the first error.
|
||||
|
||||
@ -558,7 +558,7 @@ NOTE: This is very useful in debugging a program with unmatched parentheses!
|
||||
|
||||
1. Move the cursor to the line below marked --->.
|
||||
|
||||
2. Type :s/thee/the <ENTER> . Note that this command only changes the
|
||||
2. Type :s/thee/the <ENTER> . Note that this command only changes the
|
||||
first occurrence of "thee" in the line.
|
||||
|
||||
3. Now type :s/thee/the/g . Adding the g flag means to substitute
|
||||
@ -623,7 +623,7 @@ NOTE: All : commands must be finished by hitting <ENTER>
|
||||
Lesson 5.2: MORE ON WRITING FILES
|
||||
|
||||
|
||||
** To save the changes made to the text, type :w FILENAME. **
|
||||
** To save the changes made to the text, type :w FILENAME **
|
||||
|
||||
1. Type :!dir or :!ls to get a listing of your directory.
|
||||
You already know you must hit <ENTER> after this.
|
||||
@ -638,7 +638,7 @@ NOTE: All : commands must be finished by hitting <ENTER>
|
||||
NOTE: If you were to exit Vim and start it again with vim TEST , the file
|
||||
would be an exact copy of the tutor when you saved it.
|
||||
|
||||
5. Now remove the file by typing (MS-DOS): :!del TEST
|
||||
5. Now remove the file by typing (Windows): :!del TEST
|
||||
or (Unix): :!rm TEST
|
||||
|
||||
|
||||
@ -673,7 +673,7 @@ NOTE: Pressing v starts Visual selection. You can move the cursor around
|
||||
|
||||
1. Place the cursor just above this line.
|
||||
|
||||
NOTE: After executing Step 2 you will see text from Lesson 5.3. Then move
|
||||
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 :r TEST where TEST is
|
||||
@ -681,7 +681,7 @@ NOTE: After executing Step 2 you will see text from Lesson 5.3. Then move
|
||||
The file you retrieve is placed below the cursor line.
|
||||
|
||||
3. To verify that a file was retrieved, cursor back and notice that there
|
||||
are now two copies of Lesson 5.3, the original and the file version.
|
||||
are now two copies of lesson 5.3, the original and the file version.
|
||||
|
||||
NOTE: You can also read the output of an external command. For example,
|
||||
:r !ls reads the output of the ls command and puts it below the
|
||||
@ -695,7 +695,7 @@ NOTE: You can also read the output of an external command. For example,
|
||||
1. :!command executes an external command.
|
||||
|
||||
Some useful examples are:
|
||||
(MS-DOS) (Unix)
|
||||
(Windows) (Unix)
|
||||
:!dir :!ls - shows a directory listing.
|
||||
:!del FILENAME :!rm FILENAME - removes file FILENAME.
|
||||
|
||||
@ -717,7 +717,7 @@ NOTE: You can also read the output of an external command. For example,
|
||||
|
||||
** Type o to open a line below the cursor and place you in Insert mode. **
|
||||
|
||||
1. Move the cursor to the line below marked --->.
|
||||
1. Move the cursor to the first line below marked --->.
|
||||
|
||||
2. Type the lowercase letter o to open up a line BELOW the cursor and place
|
||||
you in Insert mode.
|
||||
@ -740,8 +740,8 @@ NOTE: You can also read the output of an external command. For example,
|
||||
|
||||
** Type a to insert text AFTER the cursor. **
|
||||
|
||||
1. Move the cursor to the start of the line below marked --->.
|
||||
|
||||
1. Move the cursor to the start of the first line below marked --->.
|
||||
|
||||
2. Press e until the cursor is on the end of li .
|
||||
|
||||
3. Type an a (lowercase) to append text AFTER the cursor.
|
||||
@ -750,7 +750,7 @@ NOTE: You can also read the output of an external command. For example,
|
||||
mode.
|
||||
|
||||
5. Use e to move to the next incomplete word and repeat steps 3 and 4.
|
||||
|
||||
|
||||
---> This li will allow you to pract appendi text to a line.
|
||||
---> This line will allow you to practice appending text to a line.
|
||||
|
||||
@ -786,10 +786,10 @@ NOTE: Replace mode is like Insert mode, but every typed character deletes an
|
||||
|
||||
** Use the y operator to copy text and p to paste it **
|
||||
|
||||
1. Go to the line marked with ---> below and place the cursor after "a)".
|
||||
|
||||
1. Move to the line below marked ---> and place the cursor after "a)".
|
||||
|
||||
2. Start Visual mode with v and move the cursor to just before "first".
|
||||
|
||||
|
||||
3. Type y to yank (copy) the highlighted text.
|
||||
|
||||
4. Move the cursor to the end of the next line: j$
|
||||
@ -802,14 +802,14 @@ NOTE: Replace mode is like Insert mode, but every typed character deletes an
|
||||
---> a) this is the first item.
|
||||
b)
|
||||
|
||||
NOTE: you can also use y as an operator; yw yanks one word.
|
||||
NOTE: You can also use y as an operator; yw yanks one word.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lesson 6.5: SET OPTION
|
||||
|
||||
|
||||
** Set an option so a search or substitute ignores case **
|
||||
|
||||
1. Search for 'ignore' by entering: /ignore <ENTER>
|
||||
1. Search for 'ignore' by entering: /ignore <ENTER>
|
||||
Repeat several times by pressing n .
|
||||
|
||||
2. Set the 'ic' (Ignore case) option by entering: :set ic
|
||||
@ -823,9 +823,9 @@ NOTE: Replace mode is like Insert mode, but every typed character deletes an
|
||||
|
||||
6. To disable ignoring case enter: :set noic
|
||||
|
||||
NOTE: To remove the highlighting of matches enter: :nohlsearch
|
||||
NOTE: To remove the highlighting of matches enter: :nohlsearch
|
||||
NOTE: If you want to ignore case for just one search command, use \c
|
||||
in the phrase: /ignore\c <ENTER>
|
||||
in the phrase: /ignore\c <ENTER>
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lesson 6 SUMMARY
|
||||
|
||||
@ -883,7 +883,7 @@ NOTE: If you want to ignore case for just one search command, use \c
|
||||
|
||||
1. Start editing the "vimrc" file. This depends on your system:
|
||||
:e ~/.vimrc for Unix
|
||||
:e $VIM/_vimrc for MS-Windows
|
||||
:e $VIM/_vimrc for Windows
|
||||
|
||||
2. Now read the example "vimrc" file contents:
|
||||
:r $VIMRUNTIME/vimrc_example.vim
|
||||
@ -909,7 +909,7 @@ NOTE: If you want to ignore case for just one search command, use \c
|
||||
|
||||
4. Press CTRL-D and Vim will show a list of commands that start with "e".
|
||||
|
||||
5. Press <TAB> and Vim will complete the command name to ":edit".
|
||||
5. Type d<TAB> and Vim will complete the command name to ":edit".
|
||||
|
||||
6. Now add a space and the start of an existing file name: :edit FIL
|
||||
|
||||
@ -922,13 +922,13 @@ NOTE: Completion works for many commands. Just try pressing CTRL-D and
|
||||
Lesson 7 SUMMARY
|
||||
|
||||
|
||||
1. Type :help or press <F1> or <Help> to open a help window.
|
||||
1. Type :help or press <F1> or <HELP> to open a help window.
|
||||
|
||||
2. Type :help cmd to find help on cmd .
|
||||
|
||||
3. Type CTRL-W CTRL-W to jump to another window
|
||||
3. Type CTRL-W CTRL-W to jump to another window.
|
||||
|
||||
4. Type :q to close the help window
|
||||
4. Type :q to close the help window.
|
||||
|
||||
5. Create a vimrc startup script to keep your preferred settings.
|
||||
|
||||
|
Reference in New Issue
Block a user