Vim Recall繁體中文

Measure syntax highlighting speed

:syntime

Example

Normal 0 / 2

Measure syntax highlighting speed.

Syntax timing

Syntax
enabled for prepared Vimscript
Measurement
off
Before & after

Before

Syntax timing

Syntax
enabled for prepared Vimscript
Measurement
off

After

Syntax timing

Syntax
enabled for prepared Vimscript
Measurement
on
Next step
redraw, then :syntime report to inspect measured patterns

Subject: :syntime. Documentation-backed illustration; assumes +profile and enabled Vimscript syntax in the current window; not replay-verified. Starts measuring syntax-pattern matching time. No report values exist until redraw work is measured; the buffer is unchanged.

Sample buffer
let value = 7
Cursor on line 1, column 1
Details & Vim help

Measure syntax highlighting speed. 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 :synti[me] 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.