Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 31 additions & 9 deletions doc/insert.jax
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*insert.txt* For Vim バージョン 9.1. Last change: 2025 May 08
*insert.txt* For Vim バージョン 9.1. Last change: 2025 Jun 04


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

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

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

*ins-smarttab*
'smarttab' オプションがオンの時には、1度の<Tab>で、行の先頭で<Tab>を1度押すと
'shiftwidth' の位置まで、その他の場所では 'tabstop' の位置まで空白が挿入され
る。これは<Tab>文字の代わりに、度々スペースが挿入されることを意味している。
'smarttab' がオフの時には、<Tab>では常に 'tabstop' の位置まで空白が挿入され、
'shiftwidth' は ">>" などの時にだけ使用される。

*ins-softtabstop*
'softtabstop' オプションがゼロではない時、<Tab>は 'softtabstop' で指定されるタ
ブ位置まで空白を挿入し、<BS>は 'softtabstop' で指定されるタブ位置までの空白を
Expand All @@ -540,6 +533,13 @@ CTRL-Vを押してから入力する(CTRL-Vに他の動作がマップされて
キャラクタを消してから、それから望む場所にカーソルを持っていくために、余分な空
白文字を置く必要がある。

*ins-smarttab*
'smarttab' オプションがオンの場合、カーソルが先頭の空白文字にある時は <Tab>
キーは 'shiftwidth' でインデントする。<BS> キーは逆の効果を持つ。これは、
'softtabstop' を 'shiftwidth' の値に設定した場合と同じ動作である。このオプショ
ンを使用すると、ユーザーは 'softtabstop' を 'shiftwidth' 以外の値に設定しても、
<Tab> キーによるインデントを使用することができる。

==============================================================================
5. 置換モード *Replace* *Replace-mode* *mode-replace*

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

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

Expand Down Expand Up @@ -967,6 +968,27 @@ CTRL-X CTRL-V カーソルの前に何があるかを推測し、最初に一
える。例えば: >
:imap <Tab> <C-X><C-V>


レジスタ内容の補完 *compl-register-words*
*i_CTRL-X_CTRL-R*
CTRL-X CTRL-R カーソルの前にある項目の種類を推測し、すべてのレジスタ
からそれに最初にマッチするものを探す。
さらに CTRL-R (CTRL-X なし) を使用すると、レジスタの内
容が挿入される。|i_CTRL-R| を参照。
'ignorecase' はマッチングに適用される。


CTRL-N 次のマッチを前方検索する。このマッチは前のマッチを置き
換える。

CTRL-P 前のマッチを後方検索する。このマッチは前のマッチを置き
換える。

CTRL-X CTRL-R さらに CTRL-X CTRL-R を使用すると、2重の CTRL-X が使用
されない限り、他のコンテキストで前の展開に続く行がコ
ピーされる (例えば、これによりレジスタの単語からレジス
タの内容への補完の切り替えが行われる)。

ユーザー定義補完 *compl-function*

ユーザー定義補完は、オプション 'completefunc' で設定した関数(ユーザー定義関数
Expand Down
39 changes: 30 additions & 9 deletions en/insert.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*insert.txt* For Vim version 9.1. Last change: 2025 May 08
*insert.txt* For Vim version 9.1. Last change: 2025 Jun 04


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

==============================================================================
4. 'expandtab', 'smarttab' and 'softtabstop' options *ins-expandtab*
4. 'expandtab', 'softtabstop' and 'smarttab' options *ins-expandtab*

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

*ins-smarttab*
When the 'smarttab' option is on, a <Tab> inserts 'shiftwidth' positions at
the beginning of a line and 'tabstop' positions in other places. This means
that often spaces instead of a <Tab> character are inserted. When 'smarttab'
is off, a <Tab> always inserts 'tabstop' positions, and 'shiftwidth' is only
used for ">>" and the like.

*ins-softtabstop*
When the 'softtabstop' option is non-zero, a <Tab> inserts 'softtabstop'
positions, and a <BS> used to delete white space, will delete 'softtabstop'
Expand All @@ -561,6 +554,13 @@ the cursor. Otherwise you cannot always delete a single character before the
cursor. You will have to delete 'softtabstop' characters first, and then type
extra spaces to get where you want to be.

*ins-smarttab*
When the 'smarttab' option is on, the <Tab> key indents by 'shiftwidth' if the
cursor is in leading whitespace. The <BS> key has the opposite effect. This
behaves as if 'softtabstop' were set to the value of 'shiftwidth'. This option
allows the user to set 'softtabstop' to a value other than 'shiftwidth' and
still use the <Tab> key for indentation.

==============================================================================
5. Replace mode *Replace* *Replace-mode* *mode-replace*

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

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

Expand Down Expand Up @@ -1019,6 +1020,26 @@ CTRL-X CTRL-V Guess what kind of item is in front of the cursor and
completion, for example: >
:imap <Tab> <C-X><C-V>


Completing contents from registers *compl-register-words*
*i_CTRL-X_CTRL-R*
CTRL-X CTRL-R Guess what kind of item is in front of the cursor from
all registers and find the first match for it.
Further use of CTRL-R (without CTRL-X) will insert the
register content, see |i_CTRL-R|.
'ignorecase' applies to the matching.

CTRL-N Search forwards for next match. This match replaces
the previous one.

CTRL-P Search backwards for previous match. This match
replaces the previous one.

CTRL-X CTRL-R Further use of CTRL-X CTRL-R will copy the line
following the previous expansion in other contexts
unless a double CTRL-X is used (e.g. this switches
from completing register words to register contents).

User defined completion *compl-function*

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