Skip to content

Commit ed3b2d4

Browse files
authored
Merge pull request #2084 from h-east/update-insert
Update insert.{txt,jax}
2 parents 1834a47 + 7e28ef5 commit ed3b2d4

File tree

2 files changed

+61
-18
lines changed

2 files changed

+61
-18
lines changed

doc/insert.jax

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*insert.txt* For Vim バージョン 9.1. Last change: 2025 May 08
1+
*insert.txt* For Vim バージョン 9.1. Last change: 2025 Jun 04
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -508,7 +508,7 @@ CTRL-G j と CTRL-G k コマンドはカラムの前にテキストを挿入す
508508
|gq| も参照。
509509

510510
==============================================================================
511-
4. 'expandtab''smarttab'それと'softtabstop'オプション *ins-expandtab*
511+
4. 'expandtab''softtabstop' および 'smarttab' オプション *ins-expandtab*
512512

513513
'expandtab' オプションがオンになっていると、タブ文字は空白文字(スペース)に展開
514514
され、その空白文字が挿入される。もし本当の<Tab>文字を挿入したいのならば、
@@ -519,13 +519,6 @@ CTRL-Vを押してから入力する(CTRL-Vに他の動作がマップされて
519519
ると、1度に1つの空白が削除される。元々そこにあった文字は、1つのスペース(最後の
520520
1つ)を削除しただけで元に戻される。
521521

522-
*ins-smarttab*
523-
'smarttab' オプションがオンの時には、1度の<Tab>で、行の先頭で<Tab>を1度押すと
524-
'shiftwidth' の位置まで、その他の場所では 'tabstop' の位置まで空白が挿入され
525-
る。これは<Tab>文字の代わりに、度々スペースが挿入されることを意味している。
526-
'smarttab' がオフの時には、<Tab>では常に 'tabstop' の位置まで空白が挿入され、
527-
'shiftwidth' は ">>" などの時にだけ使用される。
528-
529522
*ins-softtabstop*
530523
'softtabstop' オプションがゼロではない時、<Tab>'softtabstop' で指定されるタ
531524
ブ位置まで空白を挿入し、<BS>'softtabstop' で指定されるタブ位置までの空白を
@@ -540,6 +533,13 @@ CTRL-Vを押してから入力する(CTRL-Vに他の動作がマップされて
540533
キャラクタを消してから、それから望む場所にカーソルを持っていくために、余分な空
541534
白文字を置く必要がある。
542535

536+
*ins-smarttab*
537+
'smarttab' オプションがオンの場合、カーソルが先頭の空白文字にある時は <Tab>
538+
キーは 'shiftwidth' でインデントする。<BS> キーは逆の効果を持つ。これは、
539+
'softtabstop''shiftwidth' の値に設定した場合と同じ動作である。このオプショ
540+
ンを使用すると、ユーザーは 'softtabstop''shiftwidth' 以外の値に設定しても、
541+
<Tab> キーによるインデントを使用することができる。
542+
543543
==============================================================================
544544
5. 置換モード *Replace* *Replace-mode* *mode-replace*
545545

@@ -624,6 +624,7 @@ Note: カーソルより後ろの文字が移動して見えることがある
624624
11. オムニ補完 |i_CTRL-X_CTRL-O|
625625
12. スペリング補完 |i_CTRL-X_s|
626626
13. 'complete' のキーワード |i_CTRL-N| |i_CTRL-P|
627+
14. レジスタの内容 |i_CTRL-X_CTRL-R|
627628

628629
追加として、|i_CTRL-X_CTRL-Z| でテキストを変更せずに補完を停止する。
629630

@@ -967,6 +968,27 @@ CTRL-X CTRL-V カーソルの前に何があるかを推測し、最初に一
967968
える。例えば: >
968969
:imap <Tab> <C-X><C-V>
969970
971+
972+
レジスタ内容の補完 *compl-register-words*
973+
*i_CTRL-X_CTRL-R*
974+
CTRL-X CTRL-R カーソルの前にある項目の種類を推測し、すべてのレジスタ
975+
からそれに最初にマッチするものを探す。
976+
さらに CTRL-R (CTRL-X なし) を使用すると、レジスタの内
977+
容が挿入される。|i_CTRL-R| を参照。
978+
'ignorecase' はマッチングに適用される。
979+
980+
981+
CTRL-N 次のマッチを前方検索する。このマッチは前のマッチを置き
982+
換える。
983+
984+
CTRL-P 前のマッチを後方検索する。このマッチは前のマッチを置き
985+
換える。
986+
987+
CTRL-X CTRL-R さらに CTRL-X CTRL-R を使用すると、2重の CTRL-X が使用
988+
されない限り、他のコンテキストで前の展開に続く行がコ
989+
ピーされる (例えば、これによりレジスタの単語からレジス
990+
タの内容への補完の切り替えが行われる)。
991+
970992
ユーザー定義補完 *compl-function*
971993

972994
ユーザー定義補完は、オプション 'completefunc' で設定した関数(ユーザー定義関数

en/insert.txt

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*insert.txt* For Vim version 9.1. Last change: 2025 May 08
1+
*insert.txt* For Vim version 9.1. Last change: 2025 Jun 04
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -529,7 +529,7 @@ paragraph, no matter where the cursor currently is. Or you can use Visual
529529
mode: hit "v", move to the end of the block, and type "gq". See also |gq|.
530530

531531
==============================================================================
532-
4. 'expandtab', 'smarttab' and 'softtabstop' options *ins-expandtab*
532+
4. 'expandtab', 'softtabstop' and 'smarttab' options *ins-expandtab*
533533

534534
If the 'expandtab' option is on, spaces will be used to fill the amount of
535535
whitespace of the tab. If you want to enter a real <Tab>, type CTRL-V first
@@ -540,13 +540,6 @@ number of characters in the line increases. Backspacing will delete one
540540
space at a time. The original character will be put back for only one space
541541
that you backspace over (the last one).
542542

543-
*ins-smarttab*
544-
When the 'smarttab' option is on, a <Tab> inserts 'shiftwidth' positions at
545-
the beginning of a line and 'tabstop' positions in other places. This means
546-
that often spaces instead of a <Tab> character are inserted. When 'smarttab'
547-
is off, a <Tab> always inserts 'tabstop' positions, and 'shiftwidth' is only
548-
used for ">>" and the like.
549-
550543
*ins-softtabstop*
551544
When the 'softtabstop' option is non-zero, a <Tab> inserts 'softtabstop'
552545
positions, and a <BS> used to delete white space, will delete 'softtabstop'
@@ -561,6 +554,13 @@ the cursor. Otherwise you cannot always delete a single character before the
561554
cursor. You will have to delete 'softtabstop' characters first, and then type
562555
extra spaces to get where you want to be.
563556

557+
*ins-smarttab*
558+
When the 'smarttab' option is on, the <Tab> key indents by 'shiftwidth' if the
559+
cursor is in leading whitespace. The <BS> key has the opposite effect. This
560+
behaves as if 'softtabstop' were set to the value of 'shiftwidth'. This option
561+
allows the user to set 'softtabstop' to a value other than 'shiftwidth' and
562+
still use the <Tab> key for indentation.
563+
564564
==============================================================================
565565
5. Replace mode *Replace* *Replace-mode* *mode-replace*
566566

@@ -649,6 +649,7 @@ Completion can be done for:
649649
11. omni completion |i_CTRL-X_CTRL-O|
650650
12. Spelling suggestions |i_CTRL-X_s|
651651
13. keywords in 'complete' |i_CTRL-N| |i_CTRL-P|
652+
14. contents from registers |i_CTRL-X_CTRL-R|
652653

653654
Additionally, |i_CTRL-X_CTRL-Z| stops completion without changing the text.
654655

@@ -1019,6 +1020,26 @@ CTRL-X CTRL-V Guess what kind of item is in front of the cursor and
10191020
completion, for example: >
10201021
:imap <Tab> <C-X><C-V>
10211022
1023+
1024+
Completing contents from registers *compl-register-words*
1025+
*i_CTRL-X_CTRL-R*
1026+
CTRL-X CTRL-R Guess what kind of item is in front of the cursor from
1027+
all registers and find the first match for it.
1028+
Further use of CTRL-R (without CTRL-X) will insert the
1029+
register content, see |i_CTRL-R|.
1030+
'ignorecase' applies to the matching.
1031+
1032+
CTRL-N Search forwards for next match. This match replaces
1033+
the previous one.
1034+
1035+
CTRL-P Search backwards for previous match. This match
1036+
replaces the previous one.
1037+
1038+
CTRL-X CTRL-R Further use of CTRL-X CTRL-R will copy the line
1039+
following the previous expansion in other contexts
1040+
unless a double CTRL-X is used (e.g. this switches
1041+
from completing register words to register contents).
1042+
10221043
User defined completion *compl-function*
10231044

10241045
Completion is done by a function that can be defined by the user with the

0 commit comments

Comments
 (0)