Home Explore Blog CI



neovim

13th chunk of `runtime/doc/repeat.txt`
7287d4a69d313cbb07e1d97fca3c9f5be30e775f6fe8be190000000100000e39
 */explorer.vim
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.

Note that functions are first loaded and later executed.  When they are loaded
the "file" breakpoints are checked, when they are executed the "func"
breakpoints.


DELETING BREAKPOINTS
						*:breakd* *:breakdel* *E161*
:breakd[el] {nr}
		Delete breakpoint {nr}.  Use |:breaklist| to see the number of
		each breakpoint.

:breakd[el] *
		Delete all breakpoints.

:breakd[el] func [lnum] {name}
		Delete a breakpoint in a function.

:breakd[el] file [lnum] {name}
		Delete a breakpoint in a sourced file.

:breakd[el] here
		Delete a breakpoint at the current line of the current file.

When [lnum] is omitted, the first breakpoint in the function or file is
deleted.
The {name} must be exactly the same as what was typed for the ":breakadd"
command.  "explorer", "*explorer.vim" and "*explorer*" are different.


LISTING BREAKPOINTS
							*:breakl* *:breaklist*
:breakl[ist]
		List all breakpoints.


OBSCURE

						*:debugg* *:debuggreedy*
:debugg[reedy]
		Read debug mode commands from the normal input stream, instead
		of getting them directly from the user.  Only useful for test
		scripts.  Example: >
		  echo 'q^Mq' | vim -e -s -c debuggreedy -c 'breakadd file script.vim' -S script.vim

:0debugg[reedy]
		Undo ":debuggreedy": get debug mode commands directly from the
		user, don't use typeahead for debug commands.

==============================================================================
Profiling						*profile* *profiling*

Profiling means that Vim measures the time that is spent on executing
functions and/or scripts.

You can also use the |reltime()| function to measure time.

For profiling syntax highlighting see |:syntime|.

For example, to profile the one_script.vim script file: >
	:profile start /tmp/one_script_profile
	:profile file one_script.vim
	:source one_script.vim
	:exit


:prof[ile] start {fname}			*:prof* *:profile* *E750*
		Start profiling, write the output in {fname} upon exit or when
		a `:profile stop` or `:profile dump` command is invoked.
		"~/" and environment variables in {fname} will be expanded.
		If {fname} already exists it will be silently overwritten.
		The variable |v:profiling| is set to one.

:prof[ile] stop
		Write the collected profiling information to the logfile and
		stop profiling. You can use the `:profile start` command to
		clear the profiling statistics and start profiling again.

:prof[ile] pause
		Stop profiling until the next `:profile continue` command.
		Can be used when doing something that should not be counted
		(e.g., an external command).  Does not nest.

:prof[ile] continue
		Continue profiling after `:profile pause`.

:prof[ile] func {pattern}
		Profile function that matches the pattern {pattern}.
		See |:debug-name| for how {pattern} is used.

:prof[ile][!] file {pattern}
		Profile script file that matches the pattern {pattern}.
		See |:debug-name| for how {pattern} is used.
		This only profiles the script itself, not the functions
		defined in it.
		When the [!] is added then all functions defined in the script
		will also be profiled.
		Note that profiling only starts when the script is loaded
		after this command.  A :profile command in the script itself
		won't work.

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

:profd[el] ...						*:profd*

Title: Debugging: Breakpoint Matching, Deletion, Listing, and Obscure Commands; Introduction to Profiling
Summary
This section covers breakpoint matching specifics for functions and files in Vim's debug mode. It details how to delete breakpoints using `:breakdel` with options to delete by number, all breakpoints, or based on function/file names and line numbers. Additionally, it explains how to list all breakpoints with `:breaklist`. The section touches on the obscure `:debuggreedy` command for test scripts. Finally, it introduces profiling, explaining how to measure time spent on function and script execution, including commands to start, stop, pause, continue, and dump profiling data. It also explains how to profile specific functions or script files.