Update runtime files
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
*usr_03.txt* For Vim version 8.1. Last change: 2017 Jul 21
|
||||
*usr_03.txt* For Vim version 8.1. Last change: 2019 Nov 21
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@ -81,8 +81,8 @@ The "$" command moves the cursor to the end of a line. If your keyboard has
|
||||
an <End> key it will do the same thing.
|
||||
|
||||
The "^" command moves to the first non-blank character of the line. The "0"
|
||||
command (zero) moves to the very first character of the line. The <Home> key
|
||||
does the same thing. In a picture:
|
||||
command (zero) moves to the very first character of the line, and the <Home>
|
||||
key does the same thing. In a picture:
|
||||
|
||||
^
|
||||
<------------
|
||||
@ -221,7 +221,8 @@ you can see? This figure shows the three commands you can use:
|
||||
L --> | text sample text |
|
||||
+---------------------------+
|
||||
|
||||
Hints: "H" stands for Home, "M" for Middle and "L" for Last.
|
||||
Hints: "H" stands for Home, "M" for Middle and "L" for Last. Alternatively,
|
||||
"H" for high, "M" for Middle and "L" for low.
|
||||
|
||||
==============================================================================
|
||||
*03.6* Telling where you are
|
||||
@ -298,22 +299,22 @@ To scroll one line at a time use CTRL-E (scroll up) and CTRL-Y (scroll down).
|
||||
Think of CTRL-E to give you one line Extra. (If you use MS-Windows compatible
|
||||
key mappings CTRL-Y will redo a change instead of scroll.)
|
||||
|
||||
To scroll forward by a whole screen (except for two lines) use CTRL-F. The
|
||||
other way is backward, CTRL-B is the command to use. Fortunately CTRL-F is
|
||||
Forward and CTRL-B is Backward, that's easy to remember.
|
||||
To scroll forward by a whole screen (except for two lines) use CTRL-F. To
|
||||
scroll backwards, use CTRL-B. These should be easy to remember: F for
|
||||
Forwards and B for Backwards.
|
||||
|
||||
A common issue is that after moving down many lines with "j" your cursor is at
|
||||
the bottom of the screen. You would like to see the context of the line with
|
||||
the cursor. That's done with the "zz" command.
|
||||
|
||||
+------------------+ +------------------+
|
||||
| some text | | some text |
|
||||
| some text | | some text |
|
||||
| some text | | some text |
|
||||
| some text | zz --> | line with cursor |
|
||||
| some text | | some text |
|
||||
| some text | | some text |
|
||||
| line with cursor | | some text |
|
||||
| earlier text | | earlier text |
|
||||
| earlier text | | earlier text |
|
||||
| earlier text | | earlier text |
|
||||
| earlier text | zz --> | line with cursor |
|
||||
| earlier text | | later text |
|
||||
| earlier text | | later text |
|
||||
| line with cursor | | later text |
|
||||
+------------------+ +------------------+
|
||||
|
||||
The "zt" command puts the cursor line at the top, "zb" at the bottom. There
|
||||
@ -353,7 +354,7 @@ The "?" command works like "/" but searches backwards: >
|
||||
|
||||
The "N" command repeats the last search the opposite direction. Thus using
|
||||
"N" after a "/" command searches backwards, using "N" after "?" searches
|
||||
forward.
|
||||
forwards.
|
||||
|
||||
|
||||
IGNORING CASE
|
||||
@ -462,8 +463,8 @@ really jump to that location. Or type more to change the search string.
|
||||
:set nowrapscan
|
||||
|
||||
This stops the search at the end of the file. Or, when you are searching
|
||||
backwards, at the start of the file. The 'wrapscan' option is on by default,
|
||||
thus searching wraps around the end of the file.
|
||||
backwards, it stops the search at the start of the file. The 'wrapscan'
|
||||
option is on by default, thus searching wraps around the end of the file.
|
||||
|
||||
|
||||
INTERMEZZO
|
||||
@ -485,7 +486,8 @@ Vim. Example: >
|
||||
Go:set hlsearch<Esc>
|
||||
|
||||
"G" moves to the end of the file. "o" starts a new line, where you type the
|
||||
":set" command. You end insert mode with <Esc>. Then write the file: >
|
||||
":set" command. You end insert mode with <Esc>. Then write and close the
|
||||
file: >
|
||||
|
||||
ZZ
|
||||
|
||||
@ -499,8 +501,8 @@ Regular expressions are an extremely powerful and compact way to specify a
|
||||
search pattern. Unfortunately, this power comes at a price, because regular
|
||||
expressions are a bit tricky to specify.
|
||||
In this section we mention only a few essential ones. More about search
|
||||
patterns and commands in chapter 27 |usr_27.txt|. You can find the full
|
||||
explanation here: |pattern|.
|
||||
patterns and commands can be found in chapter 27 |usr_27.txt|. You can find
|
||||
the full explanation here: |pattern|.
|
||||
|
||||
|
||||
BEGINNING AND END OF A LINE
|
||||
@ -526,9 +528,9 @@ And with "/^the" we find this one:
|
||||
the solder holding one of the chips melted and the ~
|
||||
xxx
|
||||
|
||||
You can try searching with "/^the$", it will only match a single line
|
||||
consisting of "the". White space does matter here, thus if a line contains a
|
||||
space after the word, like "the ", the pattern will not match.
|
||||
You can try searching with "/^the$"; it will only match a single line
|
||||
consisting entirely of "the". White space does matter here, thus if a line
|
||||
contains a space after the word, like "the ", the pattern will not match.
|
||||
|
||||
|
||||
MATCHING ANY SINGLE CHARACTER
|
||||
@ -563,20 +565,20 @@ where you came from, use this command: >
|
||||
|
||||
This ` is a backtick or open single-quote character.
|
||||
If you use the same command a second time you will jump back again. That's
|
||||
because the ` command is a jump itself, and the position from before this jump
|
||||
is remembered.
|
||||
because the "`" command is a jump itself, and the position from before this
|
||||
jump is remembered.
|
||||
|
||||
Generally, every time you do a command that can move the cursor further than
|
||||
within the same line, this is called a jump. This includes the search
|
||||
commands "/" and "n" (it doesn't matter how far away the match is). But not
|
||||
the character searches with "fx" and "tx" or the word movements "w" and "e".
|
||||
Also, "j" and "k" are not considered to be a jump. Even when you use a
|
||||
Also, "j" and "k" are not considered to be a jump, even when you use a
|
||||
count to make them move the cursor quite a long way away.
|
||||
|
||||
The `` command jumps back and forth, between two points. The CTRL-O command
|
||||
The "``" command jumps back and forth, between two points. The CTRL-O command
|
||||
jumps to older positions (Hint: O for older). CTRL-I then jumps back to newer
|
||||
positions (Hint: I is just next to O on the keyboard). Consider this sequence
|
||||
of commands: >
|
||||
positions (Hint: for many common keyboard layouts, I is just next to O).
|
||||
Consider this sequence of commands: >
|
||||
|
||||
33G
|
||||
/^The
|
||||
@ -614,9 +616,9 @@ Thus to move to the a mark:
|
||||
>
|
||||
`a
|
||||
|
||||
The command 'mark (single quotation mark, or apostrophe) moves you to the
|
||||
beginning of the line containing the mark. This differs from the `mark
|
||||
command, which moves you to marked column.
|
||||
The command "'mark" (single quotation mark, or apostrophe) moves you to the
|
||||
beginning of the line containing the mark. This differs from the "`mark"
|
||||
command, which also moves you to the marked column.
|
||||
|
||||
The marks can be very useful when working on two related parts in a file.
|
||||
Suppose you have some text near the start of the file you need to look at,
|
||||
|
||||
Reference in New Issue
Block a user