summaryrefslogtreecommitdiffstats
path: root/runtime/doc/repeat.txt
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-01-24 12:53:53 +0100
committerBram Moolenaar <Bram@vim.org>2021-01-24 12:53:53 +0100
commitb204990346ca857802b174afe8a7fbb05e4f318e (patch)
tree6660d87cac14e978841c1eaf55994bf8a85f84a9 /runtime/doc/repeat.txt
parent7cf0c114d690c91ac88c92a1a6f1b1935cb6410f (diff)
patch 8.2.2400: Vim9: compiled functions are not profiledv8.2.2400
Problem: Vim9: compiled functions are not profiled. Solution: Add initial changes to profile compiled functions. Fix that a script-local function was hard to debug.
Diffstat (limited to 'runtime/doc/repeat.txt')
-rw-r--r--runtime/doc/repeat.txt20
1 files changed, 13 insertions, 7 deletions
diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt
index fc699a1d78..195a2025a5 100644
--- a/runtime/doc/repeat.txt
+++ b/runtime/doc/repeat.txt
@@ -1,4 +1,4 @@
-*repeat.txt* For Vim version 8.2. Last change: 2021 Jan 02
+*repeat.txt* For Vim version 8.2. Last change: 2021 Jan 23
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -354,7 +354,7 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
Vim version, or update Vim to a newer version. See
|vimscript-version| for what changed between versions.
-:vim9script [noclear] *:vim9* *:vim9script*
+:vim9[script] [noclear] *:vim9* *:vim9script*
Marks a script file as containing |Vim9-script|
commands. Also see |vim9-namespace|.
Must be the first command in the file.
@@ -899,8 +899,9 @@ matches ".../plugin/explorer.vim", ".../plugin/iexplorer.vim", etc. >
matches ".../plugin/explorer.vim" and "explorer.vim" in any other directory.
The match for functions is done against the name as it's shown in the output
-of ":function". For local functions this means that something like "<SNR>99_"
-is prepended.
+of ":function". However, for local functions the script-specific prefix such
+as "<SNR>99_" is ignored to make it easier to match script-local functions
+without knowing the ID of the script.
Note that functions are first loaded and later executed. When they are loaded
the "file" breakpoints are checked, when they are executed the "func"
@@ -955,10 +956,10 @@ OBSCURE
Profiling means that Vim measures the time that is spent on executing
functions and/or scripts. The |+profile| feature is required for this.
-It is only included when Vim was compiled with "huge" features.
+It is included when Vim was compiled with "huge" features.
You can also use the |reltime()| function to measure time. This only requires
-the |+reltime| feature, which is present more often.
+the |+reltime| feature, which is present in more builds.
For profiling syntax highlighting see |:syntime|.
@@ -1005,7 +1006,12 @@ For example, to profile the one_script.vim script file: >
You must always start with a ":profile start fname" command. The resulting
-file is written when Vim exits. Here is an example of the output, with line
+file is written when Vim exits. For example, to profile one specific
+function: >
+ profile start /tmp/vimprofile
+ profile func MyFunc
+
+Here is an example of the output, with line
numbers prepended for the explanation:
1 FUNCTION Test2() ~