Mechanical
Line deletion, swaps, joins, copies, case changes, and basic movement.
open protocol · executable scoring · reproducible tasks
vimbench tests whether a language model can turn a precise editing request into a correct Vim action sequence. The result is executed in real Vim and judged against an exact target buffer.
The benchmark is deliberately narrow. It does not measure every dimension of an LLM. It isolates a useful one: reliable translation from intent to stateful tool use.
01 / PROTOCOL
The model never edits the target directly. It emits keystrokes, and the harness does the rest.
The prompt contains a natural-language instruction, the starting buffer, the desired target buffer, and the supported keystroke notation. Few-shot examples establish the response format.
The runner extracts the candidate sequence, accepting plain text or fenced code. Named tokens such as <Esc>, <CR>, and <C-V> are converted into their byte values.
The harness writes the start buffer to a temporary file and feeds the bytes to headless Vim. A safety suffix exits and saves even if the model forgets, so the resulting state can always be scored.
The saved file is compared byte-for-byte with the target. Exact matches pass; failures receive a similarity score; correct answers also receive a keystroke-efficiency score.
model response
│
▼
notation_to_bytes()
│
▼
vim -u NONE -N -n -s keys buf.txt
│
▼
final buffer == target buffer
02 / TASKS
Each seed task has a known reference sequence that must produce the exact target through the same harness.
“Change the text inside the quotes to goodbye.”
message = "hello world"message = "goodbye"f"ci"goodbye<Esc>:wq<CR>Line deletion, swaps, joins, copies, case changes, and basic movement.
Motions, text objects, macros, visual block operations, and composed commands.
Substitution, global operations, ranges, sorting, and pattern-based edits.
Multi-part transformations such as CSV changes, extraction, and cleanup.
Fresh-task track. Programmatic templates can generate additional parameterized tasks. A generated task is kept only when its reference sequence replays to an exact match, reducing dependence on a fixed, potentially memorized set.
03 / SCORING
Read pass rate first. Efficiency and partial credit explain what happened around it.
exact matches / tasks
The primary reliability measure. A pass requires the final buffer to match the target byte-for-byte, including whitespace and newlines.
min(1, reference keys / model keys)
Calculated for passed tasks. It rewards concise action sequences without granting extra credit for beating the reference.
buffer similarity, 0…1
A diagnostic score for the final buffer. It distinguishes a near miss from a destructive failure, but does not turn a failure into a pass.
95th percentile request time
Shows tail latency: 95% of model requests finished this quickly or faster. It better reflects occasional slow waits than an average alone. Total wall-clock runtime is reported separately.
When an API reports usage, vimbench should record input, output, cached, and reasoning tokens separately, plus the billed cost. These numbers explain how expensive a model was to reach its accuracy.
total tokens / passed tasks
Tokens per successful task is the most useful comparison: it does not reward a cheap model for failing quickly. Cost per successful task is the corresponding real-world measure.
Compare with care: providers use different tokenizers, cache rules, and reasoning-token reporting. Missing hidden tokens must be shown as unavailable—not treated as zero.
04 / INTERPRETATION
The leaderboard is evidence about exact editing behavior—not a universal ranking of model quality.
05 / CONTROLS
The harness removes common sources of variation so model behavior dominates the result.
-u NONE -N -n disables user configuration and swapfiles while using nocompatible mode.
set shell=/bin/false blocks shell commands. The benchmark measures Vim editing, not escape hatches.
Each task has a 10-second execution limit so runaway macros and hung sessions become consistent failures.
Start and target buffers are explicit strings, and every reference answer is replay-verified through real Vim.
Models in a leaderboard run receive the same selected tasks, preserving head-to-head comparability.
The tasks, harness, scorer, runner, and result format are public and can be audited or run locally.
06 / LIMITS
Vim competence is a proxy for compact, stateful tool use. It is not a complete coding, reasoning, or intelligence evaluation.
Efficiency compares against a verified reference solution, not a mathematically guaranteed shortest possible sequence.
The task language intentionally targets a portable subset of Vim. Plugin knowledge and advanced full-Vim features are outside the current benchmark.
The 30-task seed set is small enough to interpret but cannot cover every edit. Generated tasks help, but do not eliminate all benchmark familiarity risk.
Prompt format, model version, reasoning effort, temperature, and API behavior can affect results. Compare runs with matching settings.
REPRODUCE IT
Verify every reference task on your machine, inspect the source, then run the same suite against your model.
$ git clone https://github.com/supercobra/vimbench.git
$ cd vimbench
$ python3 run.py --verify
# 30/30 verified
Inspect the implementation