Skip to content

Commit e64d0cf

Browse files
authored
Merge pull request #1090 from tsuyoshicho/update/20220424/repeat
Update repeat.{txt,jax}
2 parents e824bd6 + 31d7ee2 commit e64d0cf

File tree

2 files changed

+58
-23
lines changed

2 files changed

+58
-23
lines changed

doc/repeat.jax

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*repeat.txt* For Vim バージョン 8.2. Last change: 2022 Jan 21
1+
*repeat.txt* For Vim バージョン 8.2. Last change: 2022 Apr 08
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -205,19 +205,24 @@ Vim script の書き方はユーザーマニュアルの41章|usr_41.txt|を参
205205

206206
Vim9 script の文脈で行の範囲読み込みが |:vim9script|
207207
コマンドで始まらない時は、|:vim9cmd| 修飾が使われる。
208-
209-
Vim9 script の文脈でバッファ内の行の範囲読み込みがされ
208+
ビジュアル選択で ":" を入力すると、"'<,'>" 形式の範囲
209+
がその前にくることがある: >
210+
:'<,'>vim9cmd source
211+
< それ以外の場合、範囲は修飾子の後に続き、すべての Vim9
212+
の範囲と同様に、プリフィックスとしてコロンを付ける必要
213+
がある: >
214+
:vim9cmd :5,9source
215+
216+
< Vim9 script の文脈でバッファ内の行の範囲読み込みがされ
210217
た時、以前に定義したスクリプトローカルの変数と関数はク
211218
リアされない。範囲が ":vim9script noclear" コマンドで
212219
始まればその動作になる。引数 "++clear" を使えばスクリ
213220
プトローカルの変数と関数をスクリプトの読み込み前にクリ
214-
アされる。範囲が |:vimscript| コマンドで引数 "noclear"
215-
なしで始まればその動作になる。
221+
アされる。範囲が `:vim9script` コマンドで引数
222+
"noclear" なしで始まればその動作になる。
216223
詳細な情報は |vim9-reload| を参照。
217224
例: >
218-
219225
:4,5source
220-
:vim9cmd :'<,'>source
221226
:10,18source ++clear
222227
223228
*:source!*
@@ -1022,18 +1027,25 @@ Note 関数はまず読み込まれ、後で実行される。読み込まれた
10221027
10231028
10241029
:prof[ile] start {fname} *:prof* *:profile* *E750*
1025-
プロファイリングを開始し、終了時に出力を {fname} に出力する。
1030+
プロファイリングを開始し、終了時もしくは `:profile stop` また
1031+
は `:profile dump` コマンドを実行した時に出力を {fname} に書き
1032+
出す。
10261033
{fname} 中の "~/" や環境変数は展開される。
10271034
{fname} がすでに存在するときは、警告なしに上書きされる。
10281035
変数 |v:profiling| に 1 が代入される。
10291036

1037+
:prof[ile] stop
1038+
収集したプロファイリング情報をログファイルに書き込み、プロファ
1039+
イリングを停止する。`:profile start` コマンドを使用して、プ
1040+
ロファイリング統計をクリアし、プロファイリングを再開できる。
1041+
10301042
:prof[ile] pause
1031-
次の ":profile continue" が実行されるまでプロファイリングをし
1043+
次の `:profile continue` が実行されるまでプロファイリングをし
10321044
ない。カウントされるべきでない何かを行う時に使うことができる
10331045
(例えば外部コマンドなど)。ネストすることはできない。
10341046

10351047
:prof[ile] continue
1036-
":profile pause" の後にこれを実行すると、プロファイリングを再
1048+
`:profile pause` の後にこれを実行すると、プロファイリングを再
10371049
開する。
10381050

10391051
:prof[ile] func {pattern}
@@ -1052,10 +1064,17 @@ Note 関数はまず読み込まれ、後で実行される。読み込まれた
10521064
プロファイリングは始まる。スクリプト自身にある :profile コマン
10531065
ドは働かない。
10541066

1067+
:prof[ile] dump
1068+
現在のプロファイリングの状態を即座にログファイルに書き込む。こ
1069+
のコマンドの実行後、Vim はプロファイリング統計の収集を継続す
1070+
る。
10551071

10561072
:profd[el] ... *:profd* *:profdel*
10571073
指定された引数に対するプロファイリングを停止する。引数について
1058-
|:breakdel| を参照。
1074+
|:breakdel| を参照。例: >
1075+
profdel func MyFunc
1076+
profdel file MyScript.vim
1077+
profdel here
10591078
10601079
最初は常に ":profile start fname" コマンドで始めなければならない。結果のファイ
10611080
ルは Vim が終了するときに書き出される。例えば、特定の1つの関数のプロファイルな

en/repeat.txt

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*repeat.txt* For Vim version 8.2. Last change: 2022 Jan 21
1+
*repeat.txt* For Vim version 8.2. Last change: 2022 Apr 08
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -210,22 +210,26 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
210210

211211
To source a range of lines that doesn't start with the
212212
|:vim9script| command in Vim9 script context, the
213-
|:vim9cmd| modifier can be used.
214-
215-
When a range of lines in a buffer is sourced in the
213+
|:vim9cmd| modifier can be used. If you use a Visual
214+
selection and type ":", the range in the form "'<,'>"
215+
can come before it: >
216+
:'<,'>vim9cmd source
217+
< Otherwise the range goes after the modifier and must
218+
have a colon prefixed, like all Vim9 ranges: >
219+
:vim9cmd :5,9source
220+
221+
< When a range of lines in a buffer is sourced in the
216222
Vim9 script context, the previously defined
217223
script-local variables and functions are not cleared.
218224
This works like the range started with the
219225
":vim9script noclear" command. The "++clear" argument
220226
can be used to clear the script-local variables and
221227
functions before sourcing the script. This works like
222-
the range started with the |:vimscript| command
228+
the range started with the `:vim9script` command
223229
without the "noclear" argument. See |vim9-reload| for
224230
more information.
225231
Examples: >
226-
227232
:4,5source
228-
:vim9cmd :'<,'>source
229233
:10,18source ++clear
230234
231235
*:source!*
@@ -1039,18 +1043,24 @@ For example, to profile the one_script.vim script file: >
10391043
10401044
10411045
:prof[ile] start {fname} *:prof* *:profile* *E750*
1042-
Start profiling, write the output in {fname} upon exit.
1046+
Start profiling, write the output in {fname} upon exit or when
1047+
a `:profile stop` or `:profile dump` command is invoked.
10431048
"~/" and environment variables in {fname} will be expanded.
10441049
If {fname} already exists it will be silently overwritten.
10451050
The variable |v:profiling| is set to one.
10461051

1052+
:prof[ile] stop
1053+
Write the collected profiling information to the logfile and
1054+
stop profiling. You can use the `:profile start` command to
1055+
clear the profiling statistics and start profiling again.
1056+
10471057
:prof[ile] pause
1048-
Don't profile until the following ":profile continue". Can be
1058+
Don't profile until the following `:profile continue`. Can be
10491059
used when doing something that should not be counted (e.g., an
10501060
external command). Does not nest.
10511061

10521062
:prof[ile] continue
1053-
Continue profiling after ":profile pause".
1063+
Continue profiling after `:profile pause`.
10541064

10551065
:prof[ile] func {pattern}
10561066
Profile function that matches the pattern {pattern}.
@@ -1067,11 +1077,17 @@ For example, to profile the one_script.vim script file: >
10671077
after this command. A :profile command in the script itself
10681078
won't work.
10691079

1080+
:prof[ile] dump
1081+
Write the current state of profiling to the logfile
1082+
immediately. After running this command, Vim continues to
1083+
collect the profiling statistics.
10701084

10711085
:profd[el] ... *:profd* *:profdel*
10721086
Stop profiling for the arguments specified. See |:breakdel|
1073-
for the arguments.
1074-
1087+
for the arguments. Examples: >
1088+
profdel func MyFunc
1089+
profdel file MyScript.vim
1090+
profdel here
10751091
10761092
You must always start with a ":profile start fname" command. The resulting
10771093
file is written when Vim exits. For example, to profile one specific

0 commit comments

Comments
 (0)