Remove a user function
Example
Normal 0 / 2Command-line 1 / 2Normal 2 / 2Remove a user function.
Loaded functions
- Twice
function(n): return a:n * 2
Command entered · ready to apply
Loaded functions
- Twice
function(n): return a:n * 2
Command line
- Typed text
:delfunction Twice- Insertion offset
18
:delfunction removes the loaded Twice definition.
Loaded functions
- Twice
absent; exists('*Twice') = 0
Before & after
Before
Loaded functions
- Twice
function(n): return a:n * 2
After
Loaded functions
- Twice
absent; exists('*Twice') = 0
Documentation-backed illustration. the shown legacy function exists, is not executing, and has no outstanding references. :delfunction removes the loaded Twice definition. Primary help: :delfunction.
alpha
beta
gammaCursor on line 1, column 1Details & Vim help
Remove a user function. This Ex reference uses the full command name; the alphabetical index omits arguments. Supply the ranges, arguments, flags and prerequisite state documented in the linked help. Press Enter to submit a complete command. The index spelling :delf[unction] puts the optional abbreviation suffix in square brackets; those brackets are not typed. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative.