Skip to content

Update {cmdline,eval,insert}.{txt,jax} #1129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 22, 2022
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
13 changes: 8 additions & 5 deletions doc/cmdline.jax
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*cmdline.txt* For Vim バージョン 9.0. Last change: 2022 Apr 29
*cmdline.txt* For Vim バージョン 9.0. Last change: 2022 Jun 16


VIMリファレンスマニュアル by Bram Moolenaar
Expand Down Expand Up @@ -892,7 +892,7 @@ Note: これらは文字通りに打ち込まれる、これらは特別なキ
る (イベント FileType, Syntax, SpellFileMissing 用)。
ファイル名としてマッチした時、フルパスに展開される。
*:<sfile>* *<sfile>*
<sfile> コマンド ":source" の実行時、読み込まれたファイルのファイル
<sfile> コマンド `:source` の実行時、読み込まれたファイルのファイル
名に置き換えられる。 *E498*
旧来の関数の実行時は、<stack> と同様にコールスタックに置き
換えられる(これは後方互換性のためであり、<stack> か
Expand All @@ -912,7 +912,7 @@ Note: これらは文字通りに打ち込まれる、これらは特別なキ
イル名に置き換えられる。
ファイル名が決定できないときは *E1274* エラーになる。
*:<slnum>* *<slnum>*
<slnum> コマンド ":source" の実行時、行番号に置き換えられる。 *E842*
<slnum> コマンド `:source` の実行時、行番号に置き換えられる。 *E842*
関数の中では、関数の先頭からの相対的な行番号になる。
*:<sflnum>* *<sflnum>*
<sflnum> スクリプトを実行すると、行番号に置き換えられる。<slnum> と
Expand Down Expand Up @@ -1095,6 +1095,9 @@ Note: ファイル名が来る筈の所では、ワイルドカードの展開
コマンドラインウィンドウが開かれたとき、Vimはノーマルモードに移るが、オプショ
ン 'insertmode' がオンのときは挿入モードに移る。

*E1292*
一度コマンドラインウィンドウを開くと、別個にそれを開くことはできない。

コマンドラインウィンドウの高さはオプション 'cmdwinheight' で指定できる (ただし
余裕がないとこれより低くなる)。常に幅は最大になり、場所はコマンドラインの直上
である。
Expand Down Expand Up @@ -1164,8 +1167,8 @@ CTRL-C コマンドラインモードとして継続する。カーソル下の
オプション 'wildchar' が <Tab> であり、コマンドラインウィンドウがExコマンドに
対して使われているときは、以下の2個のマッピングが追加され、コマンドラインウィ
ンドウ内でも <Tab> で補完ができるようになる。 >
:imap <buffer> <Tab> <C-X><C-V>
:nmap <buffer> <Tab> a<C-X><C-V>
:inoremap <buffer> <Tab> <C-X><C-V>
:nnoremap <buffer> <Tab> a<C-X><C-V>
Note: ノーマルモードで <Tab> を打ち込むと、カーソルの次の文字の位置で補完を行
うことに注意。この方法なら行末でも補完が行われる。
それらのマッピングを望まないなら、次のようにして無効化すること。 >
Expand Down
10 changes: 6 additions & 4 deletions doc/eval.jax
Original file line number Diff line number Diff line change
Expand Up @@ -1362,7 +1362,7 @@ expr10->{lambda}([args])
base->alist[idx](args)
base->(getFuncRef())(args)
Note この最後の呼び出しでは "(getFuncRef())" 関数の解決で "args" の前に base
が挿入されて渡される。
が挿入されて渡される。 *E1275*

*E274*
"->name(" には空白を含めることはできない。"->" の前と "(" の後に空白を含めるこ
Expand Down Expand Up @@ -1506,7 +1506,7 @@ Note シングルクォートが使われていることに注意。
if a =~ '\s*'


文字列補間 *$quote* *interp-string* *E256*
文字列補間 *$quote* *interp-string*
----------
$"string" 補間された文字列定数 *expr-$quote*
$'string' 補間されたリテラル文字列定数 *expr-$'*
Expand All @@ -1515,7 +1515,7 @@ $'string' 補間されたリテラル文字列定数 *expr-$'*
Vim script の式(|expr1| を参照)を含めることができる。任意の値を返す式は波括弧
で囲むことができる。値は文字列に変換される。すべてのテキストと式の結果が連結さ
れ新しい文字列が作成される。
*E1278*
*E1278* *E1279*
文字列の内容に開き波括弧 '{' または閉じ波括弧 '}' を含めるには、それを2重にす
る。バックスラッシュを使用したダブルクォートで囲まれた文字列も動作する。単一の
閉じ波括弧 '}' はエラーになる。
Expand Down Expand Up @@ -1946,6 +1946,8 @@ v:completed_item
最も最近補完された単語が含まれた|complete-items|の|Dictionary|
が|CompleteDone|イベント後に設定される。補完に失敗した時、その
|Dictionary|は空である。
Note: プラグインは、組み込みの |CompleteDone| イベントの動作を
エミュレートするために、この値を変更することができる。

*v:count* *count-variable*
v:count 最後に実行されたノーマルモードコマンドに渡されたカウント数。
Expand Down Expand Up @@ -2610,7 +2612,7 @@ Vim9 関数については |vim9.txt| を参照のこと。
:fu[nction][!] {name}([arguments]) [range] [abort] [dict] [closure]
{name} という名前で新しい関数を定義する。関数の本体は、
次の行から |:endfunction| と一致するまで続く。

*E1267*
関数名はアルファベットと数字と '_' からなり、通常の関
数はアルファベットの大文字、スクリプトローカル関数は
"s:" で始まらなければならない。Note: "b:" や "g:" は
Expand Down
11 changes: 6 additions & 5 deletions doc/insert.jax
Original file line number Diff line number Diff line change
Expand Up @@ -374,9 +374,9 @@ CTRL-G CTRL-J 1行下の、挿入開始位置と同じ列へ移動 *i_CTRL-
CTRL-O 1つコマンドを実行して、挿入モードに戻る *i_CTRL-O*
CTRL-\ CTRL-O CTRL-O と同様だがカーソルを移動させない *i_CTRL-\_CTRL-O*
CTRL-L 'insertmode' がオンのとき: ノーマルモードへ *i_CTRL-L*
CTRL-G u undo で元に戻す地点を新たに設定 *i_CTRL-G_u*
CTRL-G u undo のシーケンスを終了し、新しい変更を開始 *i_CTRL-G_u*
CTRL-G U カーソルが同じ行内にある場合、次の左右への *i_CTRL-G_U*
カーソル移動で undo を分割しない。
カーソル移動で新しい undo ブロックを開始しない
-----------------------------------------------------------------------

Note: カーソルキーを押した時に挿入モードから抜けてしまったら、'noesckeys' オプ
Expand Down Expand Up @@ -412,7 +412,8 @@ CTRL-G u を使う例: >

:inoremap <CR> <C-]><C-G>u<CR>

これは改行ごとに undo を分割する。また、それを行う前に短縮入力の展開も行う。
これは改行ごとに新しい undo ブロックを始める。また、それを行う前に短縮入力の展
開も行う。

CTRL-G U の使用例: >

Expand All @@ -426,8 +427,8 @@ CTRL-G U の使用例: >
inoremap <expr> <End> repeat('<C-G>U<Right>', col('$') - col('.'))
inoremap ( ()<C-G>U<Left>

これにより undo を分割することなくカーソルキーを挿入モード内で使うことができ、
|.| (および redo) は期待通りに動作するようになる。
これにより新しい undo ブロックを開始することなくカーソルキーを挿入モード内で使
うことができ、|.| (および redo) は期待通りに動作するようになる。
また次のような (上記の "(" マッピングをともなう) テキスト入力:

Lorem ipsum (dolor
Expand Down
12 changes: 7 additions & 5 deletions en/cmdline.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*cmdline.txt* For Vim version 9.0. Last change: 2022 Apr 29
*cmdline.txt* For Vim version 9.0. Last change: 2022 Jun 16


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -936,7 +936,7 @@ Note: these are typed literally, they are not special keys!
When the match is with a file name, it is expanded to the
full path.
*:<sfile>* *<sfile>*
<sfile> When executing a ":source" command, is replaced with the
<sfile> When executing a `:source` command, is replaced with the
file name of the sourced file. *E498*
When executing a legacy function, is replaced with the call
stack, as with <stack> (this is for backwards
Expand All @@ -959,7 +959,7 @@ Note: these are typed literally, they are not special keys!
defined.
If the file name cannot be determined you get error *E1274* .
*:<slnum>* *<slnum>*
<slnum> When executing a ":source" command, is replaced with the
<slnum> When executing a `:source` command, is replaced with the
line number. *E842*
When executing a function it's the line number relative to
the start of the function.
Expand Down Expand Up @@ -1147,6 +1147,8 @@ character that indicates the type of command-line being edited, see

Vim will be in Normal mode when the editor is opened, except when 'insertmode'
is set.
*E1292*
Once a command-line window is open it is not possible to open another one.

The height of the window is specified with 'cmdwinheight' (or smaller if there
is no room). The window is always full width and is positioned just above the
Expand Down Expand Up @@ -1218,8 +1220,8 @@ save the command-line history and read it back later.
If the 'wildchar' option is set to <Tab>, and the command-line window is used
for an Ex command, then two mappings will be added to use <Tab> for completion
in the command-line window, like this: >
:imap <buffer> <Tab> <C-X><C-V>
:nmap <buffer> <Tab> a<C-X><C-V>
:inoremap <buffer> <Tab> <C-X><C-V>
:nnoremap <buffer> <Tab> a<C-X><C-V>
Note that hitting <Tab> in Normal mode will do completion on the next
character. That way it works at the end of the line.
If you don't want these mappings, disable them with: >
Expand Down
10 changes: 6 additions & 4 deletions en/eval.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1399,7 +1399,7 @@ parenthesis), or any expression in parentheses: >
base->alist[idx](args)
base->(getFuncRef())(args)
Note that in the last call the base is passed to the function resulting from
"(getFuncRef())", inserted before "args".
"(getFuncRef())", inserted before "args". *E1275*

*E274*
"->name(" must not contain white space. There can be white space before the
Expand Down Expand Up @@ -1549,7 +1549,7 @@ to be doubled. These two commands are equivalent: >
if a =~ '\s*'


interpolated-string *$quote* *interp-string* *E256*
interpolated-string *$quote* *interp-string*
--------------------
$"string" interpolated string constant *expr-$quote*
$'string' interpolated literal string constant *expr-$'*
Expand All @@ -1559,7 +1559,7 @@ allowing the inclusion of Vim script expressions (see |expr1|). Any
expression returning a value can be enclosed between curly braces. The value
is converted to a string. All the text and results of the expressions
are concatenated to make a new string.
*E1278*
*E1278* *E1279*
To include an opening brace '{' or closing brace '}' in the string content
double it. For double quoted strings using a backslash also works. A single
closing brace '}' will result in an error.
Expand Down Expand Up @@ -2005,6 +2005,8 @@ v:completed_item
|Dictionary| containing the |complete-items| for the most
recently completed word after |CompleteDone|. The
|Dictionary| is empty if the completion failed.
Note: Plugins can modify the value to emulate the builtin
|CompleteDone| event behavior.

*v:count* *count-variable*
v:count The count given for the last Normal mode command. Can be used
Expand Down Expand Up @@ -2680,7 +2682,7 @@ See |:verbose-cmd| for more information.
Define a new function by the name {name}. The body of
the function follows in the next lines, until the
matching |:endfunction|.

*E1267*
The name must be made of alphanumeric characters and
'_', and must start with a capital or "s:" (see
above). Note that using "b:" or "g:" is not allowed.
Expand Down
18 changes: 9 additions & 9 deletions en/insert.txt
Original file line number Diff line number Diff line change
Expand Up @@ -388,10 +388,10 @@ CTRL-G CTRL-J cursor one line down, insert start column *i_CTRL-G_CTRL-J*
CTRL-O execute one command, return to Insert mode *i_CTRL-O*
CTRL-\ CTRL-O like CTRL-O but don't move the cursor *i_CTRL-\_CTRL-O*
CTRL-L when 'insertmode' is set: go to Normal mode *i_CTRL-L*
CTRL-G u break undo sequence, start new change *i_CTRL-G_u*
CTRL-G U don't break undo with next left/right cursor *i_CTRL-G_U*
movement, if the cursor stays within the
same line
CTRL-G u close undo sequence, start new change *i_CTRL-G_u*
CTRL-G U don't start a new undo block with the next *i_CTRL-G_U*
left/right cursor movement, if the cursor
stays within the same line
-----------------------------------------------------------------------

Note: If the cursor keys take you out of Insert mode, check the 'noesckeys'
Expand Down Expand Up @@ -428,8 +428,8 @@ that, with CTRL-O u. Another example: >

:inoremap <CR> <C-]><C-G>u<CR>

This breaks undo at each line break. It also expands abbreviations before
this.
This starts a new undo block at each line break. It also expands
abbreviations before this.

An example for using CTRL-G U: >

Expand All @@ -443,9 +443,9 @@ An example for using CTRL-G U: >
inoremap <expr> <End> repeat('<C-G>U<Right>', col('$') - col('.'))
inoremap ( ()<C-G>U<Left>

This makes it possible to use the cursor keys in Insert mode, without breaking
the undo sequence and therefore using |.| (redo) will work as expected.
Also entering a text like (with the "(" mapping from above):
This makes it possible to use the cursor keys in Insert mode, without starting
a new undo block and therefore using |.| (redo) will work as expected. Also
entering a text like (with the "(" mapping from above):

Lorem ipsum (dolor

Expand Down