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
2
2
3
3
4
4
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|.
210
210
211
211
To source a range of lines that doesn't start with the
212
212
| :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
216
222
Vim9 script context, the previously defined
217
223
script-local variables and functions are not cleared.
218
224
This works like the range started with the
219
225
":vim9script noclear" command. The "++clear" argument
220
226
can be used to clear the script-local variables and
221
227
functions before sourcing the script. This works like
222
- the range started with the | :vimscript | command
228
+ the range started with the `: vim9script ` command
223
229
without the "noclear" argument. See | vim9-reload | for
224
230
more information.
225
231
Examples: >
226
-
227
232
:4,5source
228
- :vim9cmd :'<,'>source
229
233
:10,18source ++clear
230
234
231
235
*:source!*
@@ -1039,18 +1043,24 @@ For example, to profile the one_script.vim script file: >
1039
1043
1040
1044
1041
1045
: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.
1043
1048
"~/" and environment variables in {fname} will be expanded.
1044
1049
If {fname} already exists it will be silently overwritten.
1045
1050
The variable | v:profiling | is set to one.
1046
1051
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
+
1047
1057
: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
1049
1059
used when doing something that should not be counted (e.g., an
1050
1060
external command). Does not nest.
1051
1061
1052
1062
:prof[ile] continue
1053
- Continue profiling after " :profile pause" .
1063
+ Continue profiling after ` :profile pause` .
1054
1064
1055
1065
:prof[ile] func {pattern}
1056
1066
Profile function that matches the pattern {pattern} .
@@ -1067,11 +1077,17 @@ For example, to profile the one_script.vim script file: >
1067
1077
after this command. A :profile command in the script itself
1068
1078
won't work.
1069
1079
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.
1070
1084
1071
1085
:profd[el] ... *:profd* *:profdel*
1072
1086
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
1075
1091
1076
1092
You must always start with a ":profile start fname" command. The resulting
1077
1093
file is written when Vim exits. For example, to profile one specific
0 commit comments