Skip to content

Commit 2656235

Browse files
update usr_03.{txt. jax}
1 parent 1375750 commit 2656235

File tree

2 files changed

+53
-48
lines changed

2 files changed

+53
-48
lines changed

doc/usr_03.jax

+19-16
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*usr_03.txt* For Vim バージョン 8.1. Last change: 2017 Jul 21
1+
*usr_03.txt* For Vim バージョン 8.1. Last change: 2019 Nov 21
22

33
VIM USER MANUAL - by Bram Moolenaar
44

@@ -213,7 +213,8 @@ CやC++のプログラマであれば、次のようなパターンのエラー
213213
L --> | text sample text |
214214
+---------------------------+
215215

216-
("H" はHome、"M" はMiddle、"L" はLastの意味です)
216+
("H" はHome、"M" はMiddle、"L" はLastの意味です。あるいは、"H" をHigh, "M" を
217+
Middle, "L" をLowともみなせます)
217218

218219
==============================================================================
219220
*03.6* 現在の場所を表示
@@ -293,13 +294,13 @@ CTRL-Dコマンドは窓を半分だけ下げます。つまりテキストが
293294
行を表示したい場合は "zz" コマンドを使います。
294295

295296
+------------------+ +------------------+
296-
| some text | | some text |
297-
| some text | | some text |
298-
| some text | | some text |
299-
| some text | zz --> | line with cursor |
300-
| some text | | some text |
301-
| some text | | some text |
302-
| line with cursor | | some text |
297+
| earlier text | | earlier text |
298+
| earlier text | | earlier text |
299+
| earlier text | | earlier text |
300+
| earlier text | zz --> | line with cursor |
301+
| earlier text | | later text |
302+
| earlier text | | later text |
303+
| line with cursor | | later text |
303304
+------------------+ +------------------+
304305

305306
"zt" コマンドでカーソル行を画面の 1 行目として表示できます。"zb" コマンドなら
@@ -554,8 +555,8 @@ Vimでは、検索に正規表現(regular expressions)を使います。
554555
555556
この ` は backtick とか open single-quote と呼ばれる(日本では「バッククォート」
556557
が多いでしょうか)ものです。
557-
このコマンドを 2 回実行すると、元の場所に戻ります。これは ` コマンドもジャンプ
558-
コマンドなので、実行前の場所が記録されるためです。
558+
このコマンドを 2 回実行すると、元の場所に戻ります。これは "`" コマンドもジャン
559+
プコマンドなので、実行前の場所が記録されるためです。
559560

560561
通常、現在行以外にカーソルが動くようなコマンドを実行した場合、それをジャンプ
561562
と呼びます。"/" や "n" もジャンプの一種です(ジャンプ先がどれだけ離れているかは
@@ -564,9 +565,10 @@ Vimでは、検索に正規表現(regular expressions)を使います。
564565
"j" や "k" はカウンタを指定すればカーソルをはるか彼方に移動できますが、これも
565566
ジャンプ扱いではありません。
566567

567-
``コマンドは 2 個所の間を交互にジャンプします。CTRL-Oコマンドはより古いマーク
568-
(O は Older の意味です)にジャンプします。CTRL-Iはより新しいマーク("I" キーは
569-
"O" キーのすぐ左隣りです)にジャンプします。次のコマンドを例にしましょう。 >
568+
"``" コマンドは 2 個所の間を交互にジャンプします。CTRL-Oコマンドはより古いマー
569+
ク (O は Older の意味です)にジャンプします。CTRL-Iはより新しいマーク( たいてい
570+
のキーボード配列では "I" キーは "O" キーのすぐ左隣りです)にジャンプします。次
571+
のコマンドを例にしましょう。 >
570572
571573
33G
572574
/^The
@@ -604,8 +606,9 @@ CTRL-Iを使うと33行目にジャンプし、さらにCTRL-Iを使うと行頭
604606
>
605607
`a
606608
<
607-
'{mark}(アポストロフィ + マーク名)コマンドで{mark}を設定してある行の行頭に移動
608-
できます。`{mark}の場合は{mark}を設定した桁位置に移動します。
609+
"'{mark}" (アポストロフィ + マーク名)コマンドで{mark}を設定してある行の行頭に
610+
移動 できます。"`{mark}" コマンドの場合は更に、{mark}を設定した桁位置に移動し
611+
ます。
609612

610613
マーク機能はファイル中の関連している 2 箇所で作業をする場合に便利です。例えば、
611614
ファイルの最後の方を編集している時に、ファイルの最初の方の内容を確認する必要が

en/usr_03.txt

+34-32
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*usr_03.txt* For Vim version 8.1. Last change: 2017 Jul 21
1+
*usr_03.txt* For Vim version 8.1. Last change: 2019 Nov 21
22

33
VIM USER MANUAL - by Bram Moolenaar
44

@@ -81,8 +81,8 @@ The "$" command moves the cursor to the end of a line. If your keyboard has
8181
an <End> key it will do the same thing.
8282

8383
The "^" command moves to the first non-blank character of the line. The "0"
84-
command (zero) moves to the very first character of the line. The <Home> key
85-
does the same thing. In a picture:
84+
command (zero) moves to the very first character of the line, and the <Home>
85+
key does the same thing. In a picture:
8686

8787
^
8888
<------------
@@ -221,7 +221,8 @@ you can see? This figure shows the three commands you can use:
221221
L --> | text sample text |
222222
+---------------------------+
223223

224-
Hints: "H" stands for Home, "M" for Middle and "L" for Last.
224+
Hints: "H" stands for Home, "M" for Middle and "L" for Last. Alternatively,
225+
"H" for high, "M" for Middle and "L" for low.
225226

226227
==============================================================================
227228
*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).
298299
Think of CTRL-E to give you one line Extra. (If you use MS-Windows compatible
299300
key mappings CTRL-Y will redo a change instead of scroll.)
300301

301-
To scroll forward by a whole screen (except for two lines) use CTRL-F. The
302-
other way is backward, CTRL-B is the command to use. Fortunately CTRL-F is
303-
Forward and CTRL-B is Backward, that's easy to remember.
302+
To scroll forward by a whole screen (except for two lines) use CTRL-F. To
303+
scroll backwards, use CTRL-B. These should be easy to remember: F for
304+
Forwards and B for Backwards.
304305

305306
A common issue is that after moving down many lines with "j" your cursor is at
306307
the bottom of the screen. You would like to see the context of the line with
307308
the cursor. That's done with the "zz" command.
308309

309310
+------------------+ +------------------+
310-
| some text | | some text |
311-
| some text | | some text |
312-
| some text | | some text |
313-
| some text | zz --> | line with cursor |
314-
| some text | | some text |
315-
| some text | | some text |
316-
| line with cursor | | some text |
311+
| earlier text | | earlier text |
312+
| earlier text | | earlier text |
313+
| earlier text | | earlier text |
314+
| earlier text | zz --> | line with cursor |
315+
| earlier text | | later text |
316+
| earlier text | | later text |
317+
| line with cursor | | later text |
317318
+------------------+ +------------------+
318319

319320
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: >
353354
354355
The "N" command repeats the last search the opposite direction. Thus using
355356
"N" after a "/" command searches backwards, using "N" after "?" searches
356-
forward.
357+
forwards.
357358

358359

359360
IGNORING CASE
@@ -462,8 +463,8 @@ really jump to that location. Or type more to change the search string.
462463
:set nowrapscan
463464
464465
This stops the search at the end of the file. Or, when you are searching
465-
backwards, at the start of the file. The 'wrapscan' option is on by default,
466-
thus searching wraps around the end of the file.
466+
backwards, it stops the search at the start of the file. The 'wrapscan'
467+
option is on by default, thus searching wraps around the end of the file.
467468

468469

469470
INTERMEZZO
@@ -485,7 +486,8 @@ Vim. Example: >
485486
Go:set hlsearch<Esc>
486487
487488
"G" moves to the end of the file. "o" starts a new line, where you type the
488-
":set" command. You end insert mode with <Esc>. Then write the file: >
489+
":set" command. You end insert mode with <Esc>. Then write and close the
490+
file: >
489491
490492
ZZ
491493
@@ -499,8 +501,8 @@ Regular expressions are an extremely powerful and compact way to specify a
499501
search pattern. Unfortunately, this power comes at a price, because regular
500502
expressions are a bit tricky to specify.
501503
In this section we mention only a few essential ones. More about search
502-
patterns and commands in chapter 27 |usr_27.txt|. You can find the full
503-
explanation here: |pattern|.
504+
patterns and commands can be found in chapter 27 |usr_27.txt|. You can find
505+
the full explanation here: |pattern|.
504506

505507

506508
BEGINNING AND END OF A LINE
@@ -526,9 +528,9 @@ And with "/^the" we find this one:
526528
the solder holding one of the chips melted and the ~
527529
xxx
528530

529-
You can try searching with "/^the$", it will only match a single line
530-
consisting of "the". White space does matter here, thus if a line contains a
531-
space after the word, like "the ", the pattern will not match.
531+
You can try searching with "/^the$"; it will only match a single line
532+
consisting entirely of "the". White space does matter here, thus if a line
533+
contains a space after the word, like "the ", the pattern will not match.
532534

533535

534536
MATCHING ANY SINGLE CHARACTER
@@ -563,20 +565,20 @@ where you came from, use this command: >
563565
564566
This ` is a backtick or open single-quote character.
565567
If you use the same command a second time you will jump back again. That's
566-
because the ` command is a jump itself, and the position from before this jump
567-
is remembered.
568+
because the "`" command is a jump itself, and the position from before this
569+
jump is remembered.
568570

569571
Generally, every time you do a command that can move the cursor further than
570572
within the same line, this is called a jump. This includes the search
571573
commands "/" and "n" (it doesn't matter how far away the match is). But not
572574
the character searches with "fx" and "tx" or the word movements "w" and "e".
573-
Also, "j" and "k" are not considered to be a jump. Even when you use a
575+
Also, "j" and "k" are not considered to be a jump, even when you use a
574576
count to make them move the cursor quite a long way away.
575577

576-
The `` command jumps back and forth, between two points. The CTRL-O command
578+
The "``" command jumps back and forth, between two points. The CTRL-O command
577579
jumps to older positions (Hint: O for older). CTRL-I then jumps back to newer
578-
positions (Hint: I is just next to O on the keyboard). Consider this sequence
579-
of commands: >
580+
positions (Hint: for many common keyboard layouts, I is just next to O).
581+
Consider this sequence of commands: >
580582
581583
33G
582584
/^The
@@ -614,9 +616,9 @@ Thus to move to the a mark:
614616
>
615617
`a
616618
617-
The command 'mark (single quotation mark, or apostrophe) moves you to the
618-
beginning of the line containing the mark. This differs from the `mark
619-
command, which moves you to marked column.
619+
The command "'mark" (single quotation mark, or apostrophe) moves you to the
620+
beginning of the line containing the mark. This differs from the "`mark"
621+
command, which also moves you to the marked column.
620622

621623
The marks can be very useful when working on two related parts in a file.
622624
Suppose you have some text near the start of the file you need to look at,

0 commit comments

Comments
 (0)