Disassemble Vim9 user function
Example
Normal 0 / 3Command-line 1 / 3Hit-enter prompt 2 / 3Normal 3 / 3Disassemble Vim9 user function.
Loaded Vim9 function
vim9script def g:Twice(n: number): number return n * 2 enddef
- g:Twice
defined- Source file
typed-twice.vim
Command entered · ready to apply
Loaded Vim9 function
vim9script def g:Twice(n: number): number return n * 2 enddef
- g:Twice
defined- Source file
typed-twice.vim
Command line
- Typed text
:disassemble g:Twice- Insertion offset
20
:disassemble displays the instructions for g:Twice; the panel summarizes their operations without asserting version-specific opcode spelling. Press Enter to dismiss the output prompt.
Loaded Vim9 function
vim9script def g:Twice(n: number): number return n * 2 enddef
- g:Twice
compiled- Source file
typed-twice.vim
Disassembly contents (summary)
- g:Twice
load argument n; push number 2; numeric multiply; return value- Display
actual instruction formatting depends on Vim version
Acknowledge the output; the bytecode summary remains available for comparison.
Loaded Vim9 function
vim9script def g:Twice(n: number): number return n * 2 enddef
- g:Twice
compiled- Source file
typed-twice.vim
Disassembly contents (summary)
- g:Twice
load argument n; push number 2; numeric multiply; return value- Display
actual instruction formatting depends on Vim version
Before & after
Before
Loaded Vim9 function
vim9script def g:Twice(n: number): number return n * 2 enddef
- g:Twice
defined- Source file
typed-twice.vim
After
Loaded Vim9 function
vim9script def g:Twice(n: number): number return n * 2 enddef
- g:Twice
compiled- Source file
typed-twice.vim
Disassembly contents (summary)
- g:Twice
load argument n; push number 2; numeric multiply; return value- Display
actual instruction formatting depends on Vim version
Documentation-backed illustration. Vim9 support; typed-twice.vim was sourced with the shown global :def; cmdheight=1 and nomore. :disassemble displays the instructions for g:Twice; the panel summarizes their operations without asserting version-specific opcode spelling. Primary help: :disassemble.
vim9script
def g:Twice(n: number): number
return n * 2
enddefCursor on line 1, column 1Details & Vim help
Disassemble Vim9 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 :disa[ssemble] 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. Vim9 script constructs require the documented Vim9 script context.