@vim-villain/engine 0.0.0-stage → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +66 -0
- package/DIVERGENCES.md +51 -0
- package/LICENSE +21 -0
- package/README.md +298 -2
- package/dist/buffer.d.ts +55 -0
- package/dist/buffer.d.ts.map +1 -0
- package/dist/buffer.js +191 -0
- package/dist/buffer.js.map +1 -0
- package/dist/constants.d.ts +16 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +16 -0
- package/dist/constants.js.map +1 -0
- package/dist/engine.d.ts +6 -0
- package/dist/engine.d.ts.map +1 -0
- package/dist/engine.js +315 -0
- package/dist/engine.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/insert.d.ts +25 -0
- package/dist/insert.d.ts.map +1 -0
- package/dist/insert.js +364 -0
- package/dist/insert.js.map +1 -0
- package/dist/keys.d.ts +20 -0
- package/dist/keys.d.ts.map +1 -0
- package/dist/keys.js +41 -0
- package/dist/keys.js.map +1 -0
- package/dist/motions.d.ts +32 -0
- package/dist/motions.d.ts.map +1 -0
- package/dist/motions.js +462 -0
- package/dist/motions.js.map +1 -0
- package/dist/operators.d.ts +25 -0
- package/dist/operators.d.ts.map +1 -0
- package/dist/operators.js +648 -0
- package/dist/operators.js.map +1 -0
- package/dist/state.d.ts +22 -0
- package/dist/state.d.ts.map +1 -0
- package/dist/state.js +122 -0
- package/dist/state.js.map +1 -0
- package/dist/types.d.ts +185 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +8 -0
- package/dist/types.js.map +1 -0
- package/package.json +47 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@vim-villain/engine` are recorded here. The engine is pre-1.0;
|
|
4
|
+
minor releases can change behavior, and every observable change is versioned. See
|
|
5
|
+
[DIVERGENCES.md](./DIVERGENCES.md) for the intentional differences from Neovim.
|
|
6
|
+
|
|
7
|
+
## [0.4.0] — 2026-11-17
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Normal-mode operators: `d`, `c`, `y`, `>`, `<`, `gu`, and `gU`, over motions.
|
|
12
|
+
- Doubled operators `dd`, `cc`, `yy`, `>>`, `<<`, `guu`, and `gUU`.
|
|
13
|
+
- Combined operator/motion counts, capped by `MAX_COUNT`.
|
|
14
|
+
- The unnamed register with a linewise flag, written by delete, change, and yank.
|
|
15
|
+
- One undo block per operator command; a `c` command and its insertion are one block.
|
|
16
|
+
- Direct `~` with counts.
|
|
17
|
+
- ASCII case conversion for `gu`, `gU`, and `~`.
|
|
18
|
+
- Differential coverage for operators, including register comparison against Neovim.
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- `cw`/`cW` follow Vim's word-change rules: end-of-word change, single-character
|
|
23
|
+
change on a word's last character, and whole-word counts without trailing space.
|
|
24
|
+
- `dw`/`yw` follow Vim's end-of-line rule and can cross lines when counted.
|
|
25
|
+
- Linewise delete preserves the original cursor column, clamped to the new line.
|
|
26
|
+
- Counted linewise operators are no-ops when the clamped range is still one line.
|
|
27
|
+
|
|
28
|
+
### Fixed
|
|
29
|
+
|
|
30
|
+
- `c` inserts at the start of the changed range instead of one character earlier.
|
|
31
|
+
- Empty/zero-width ranges no longer create phantom register contents.
|
|
32
|
+
- `c0`, `ch`, and `cl` enter insert mode correctly at line edges.
|
|
33
|
+
- Word operators on an empty line use the documented simplified range.
|
|
34
|
+
|
|
35
|
+
## [0.3.0] — 2026-11-17
|
|
36
|
+
|
|
37
|
+
### Added
|
|
38
|
+
|
|
39
|
+
- Insert mode entry: `i`, `a`, `I`, `A`, `o`, and `O`, with counts.
|
|
40
|
+
- Printable typing, `Enter`, `Tab`, `Backspace`, `Delete`, and `Escape`.
|
|
41
|
+
- Autoindent for `Enter`, `o`, and `O`, including counted multi-line insertion.
|
|
42
|
+
- Insert-mode cursor positions at the append column.
|
|
43
|
+
|
|
44
|
+
### Changed
|
|
45
|
+
|
|
46
|
+
- An insert session is one undo block.
|
|
47
|
+
|
|
48
|
+
## [0.2.0] — 2026-11-17
|
|
49
|
+
|
|
50
|
+
### Added
|
|
51
|
+
|
|
52
|
+
- Initial public contract: `initialState`, `step`, `applyKeys`, serializable state,
|
|
53
|
+
key-token vocabulary, and version constants.
|
|
54
|
+
- Normal-mode motions: `h`, `j`, `k`, `l`, `w`, `b`, `e`, `W`, `B`, `E`, `0`, `^`,
|
|
55
|
+
`$`, `gg`, `G`, `f`, `t`, `F`, `T`, `;`, and `,`.
|
|
56
|
+
- Counts, `curswant` for vertical motions, character-search state, and deterministic
|
|
57
|
+
handling of unsupported keys.
|
|
58
|
+
- Neovim 0.11.6 differential harness and corpus.
|
|
59
|
+
|
|
60
|
+
### Notes
|
|
61
|
+
|
|
62
|
+
- `0.1.0` was the unpublished contract snapshot. No package was published from it.
|
|
63
|
+
|
|
64
|
+
## Unreleased
|
|
65
|
+
|
|
66
|
+
- Text objects, visual mode, paste, `x`/`X`/`r`, undo/redo commands, and dot-repeat.
|
package/DIVERGENCES.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Intentional divergences from Neovim
|
|
2
|
+
|
|
3
|
+
The correctness oracle is **Neovim 0.11.6**, driven headless with `-u NONE -i NONE` and the option set described below. Every intentional difference must be listed here with a test that pins it. Accidental differences should be fixed, not documented.
|
|
4
|
+
|
|
5
|
+
No search-repeat divergence is currently intended. The engine matches Neovim's failed-search bookkeeping and its count-1 `t`/`T` "force a move past an adjacent match" quirk; see the tests listed below.
|
|
6
|
+
|
|
7
|
+
## Divergence table
|
|
8
|
+
|
|
9
|
+
| # | Divergence | Why | Test(s) |
|
|
10
|
+
|---|---|---|---|
|
|
11
|
+
| 1 | **Columns are Unicode code points**, not Neovim UTF-8 byte columns. | The browser renderer addresses code points; byte columns are a storage detail of Neovim. | Unit: `motions > motions index Unicode code points, not UTF-8/UTF-16 units`. Differential: corpus cases `unicode/h-l`, `unicode/dollar`, `unicode/find-x`, `unicode/vertical`, `unicode/dollar-second`, `unicode/gg-G` (harness converts byte↔code-point columns). |
|
|
12
|
+
| 2 | **Indent shift width is fixed at 2 spaces.** Neovim's default `shiftwidth` is 8; the differential harness sets `shiftwidth=2 expandtab` so indent/Tab behavior is comparable. | Lessons need a fixed, environment-independent edit width. This is observable through insert-mode `Tab` and `>`/`<`. | Unit: `contract > exports a 0.x semver and pinned reference values` asserts `SHIFT_WIDTH === 2`; `indent and case operators > >> shifts a line by the fixed shift width`; `insert-mode editing > Tab expands using smarttab in indentation and tabstops elsewhere`. Differential: `operator/*/>>`, `operator/*/<<`, `insert/tab/*`. |
|
|
13
|
+
| 3 | **Tab width for measuring indentation is fixed at 8 columns.** | Insert-mode `Tab` and autoindent must not depend on the user's `tabstop`; the harness sets `tabstop=8`. | Unit: `contract > exports a 0.x semver and pinned reference values` asserts `TAB_WIDTH === 8`; `insert entry commands > o and O expand tab indentation to spaces`; `insert-mode editing > Tab expands using smarttab...`. |
|
|
14
|
+
| 4 | **Counts are capped at `MAX_COUNT = 9999`.** Neovim accepts much larger counts. | A short key log must not force unbounded replay work on the server. | Unit: `motions > enormous vertical counts are bounded and clamp` and `motions > count digits accumulate and huge counts are capped`; `insert entry commands > huge insert counts are capped by MAX_COUNT`. Differential: `digits/9999j`. |
|
|
15
|
+
| 5 | **Word motions use a fixed ASCII word class** (`A-Za-z0-9_`). All other non-blank code points are punctuation; `W`/`B`/`E` use whitespace-delimited WORDS. Neovim's `iskeyword` includes non-ASCII letters (e.g. `é`) by default. | Determinism across JS/Bun versions and browsers: no runtime/locale-dependent Unicode tables. | Unit: `motions > non-ASCII code points are punctuation for word motions`. Differential corpus deliberately exercises non-ASCII only for column-sensitive non-word motions; word-motion Unicode cases would be expected divergences. |
|
|
16
|
+
| 6 | **Preferred column retention is narrower than Vim's curswant.** The engine retains the preferred column across consecutive `j`/`k` commands and remembers MAXCOL after `$`; any other completed command resets it. Neovim may retain curswant across more operations. | Keeps the state meaning explicit and avoids stale hidden state while the command set is small. Tested sequences match Neovim. | Unit: `motions > consecutive vertical motions retain the preferred column`, `motions > non-vertical commands reset the preferred column`, `motions > $ sets an end-of-line preferred column for a following vertical move`. Differential: `curswant/*`. |
|
|
17
|
+
| 7 | **Unsupported commands are deterministic no-ops with `recognized: false`.** Neovim implements many more commands; the engine does not pretend to. | The contract must distinguish "engine understood and consumed" from "not in this release", so content policy and replay reporting stay honest. | Unit: `contract > an unknown command is a deterministic recognized=false no-op`, `motions > out-of-scope edit, visual, and history commands are not stubbed as recognized`, `insert-mode editing > unknown insert tokens are no-ops and do not affect the session`. |
|
|
18
|
+
| 9 | **Case conversion is ASCII-only.** `~`, `gu`, and `gU` leave non-ASCII code points unchanged. | Matches the fixed ASCII word classes and avoids runtime-dependent Unicode case tables or multi-code-point expansions such as `ß` → `SS`. | Unit: `indent and case operators > guu and gUU use ASCII case conversion`; `indent and case operators > non-ASCII case is unchanged by case operators`. Differential corpus uses ASCII buffers. |
|
|
19
|
+
| 10 | **Word operators that start on an empty line use a simplified range.** In a multi-line buffer the engine treats `w`/`W` as a linewise range for `d`/`y`/`c`; it does not model Neovim's additional quirks for `e`/`b` from an empty line or counted `w` that consumes the following line. Content must not start a word operator on an empty line. | These cases are not useful for teaching and modeling them adds state with no lesson value in 0.4.0. | Unit: `operator bookkeeping > word operators from an empty line use the simplified engine range`. |
|
|
20
|
+
| 8 | **Insert-mode whitespace follows the harness option set** (`expandtab`, `smarttab`, `softtabstop=0`, `tabstop=8`, `shiftwidth=2`). Stock Neovim without `expandtab` inserts a literal tab for `Tab`, and autoindent preserves tabs instead of expanding them. | The engine must be configuration-free and deterministic. It fixes the reference options rather than reading the environment. | Unit: `insert-mode editing > Tab expands using smarttab in indentation and tabstops elsewhere`; `insert entry commands > o and O expand tab indentation to spaces`; `insert-mode editing > Enter before existing indentation strips the moved indentation`. Differential: `insert/tab/*`, `insert/enter/tab-indent`, `insert/o/tab-indent`, `insert/O/tab-indent`. |
|
|
21
|
+
|
|
22
|
+
## Reference environment and `-u NONE` notes
|
|
23
|
+
|
|
24
|
+
The harness explicitly sets these options so that reference behavior is not an accident of startup defaults:
|
|
25
|
+
|
|
26
|
+
```vim
|
|
27
|
+
set shiftwidth=2 expandtab tabstop=8
|
|
28
|
+
set smarttab softtabstop=0
|
|
29
|
+
set autoindent backspace=indent,eol,start
|
|
30
|
+
set noswapfile nofoldenable nowrap
|
|
31
|
+
set scrolloff=0 sidescrolloff=0
|
|
32
|
+
set virtualedit=
|
|
33
|
+
set nostartofline
|
|
34
|
+
set belloff=all
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Relevant points:
|
|
38
|
+
|
|
39
|
+
- Neovim 0.11.6 with `-u NONE` already has `autoindent` enabled (unlike classic Vim defaults); the harness sets it explicitly. The engine implements autoindent for `Enter`, `o`, and `O`; tests: `insert entry commands > o and O open indented lines below and above`, `insert-mode editing > Enter splits the line and copies indentation`.
|
|
40
|
+
- `backspace=indent,eol,start` is set explicitly. The engine's `Backspace` removes the whole indent at the first non-blank and joins lines at column 0; test: `insert-mode editing > Backspace removes the whole indent at the first non-blank`.
|
|
41
|
+
- `expandtab`, `smarttab`, `softtabstop=0`, and `tabstop=8` are set explicitly. Tab inserts spaces under this configuration; see divergence 8.
|
|
42
|
+
- `nostartofline` is the Neovim default in this environment and is set explicitly. `gg`/`G` preserve the current column, clamped to the target line. An earlier probe that appeared to show column 0 used an out-of-range cursor column; Neovim clamped that cursor to column 0, and the observation was not a valid `gg`/`G` behavior.
|
|
43
|
+
- `$` with a count performs a downward line motion first. On the last line (or a one-line buffer), a count greater than 1 is a no-op; this is Neovim behavior, not a divergence.
|
|
44
|
+
- The harness sets `shiftwidth=2 expandtab`, so its indent reference intentionally differs from stock Neovim defaults. `>`/`<` shift by `SHIFT_WIDTH = 2` and expand a leading tab to spaces, matching the normalized reference rather than stock Neovim.
|
|
45
|
+
- Search repeat uses from-cursor scanning, records failed searches, and applies the count-1 `t`/`T` adjacent-character skip. Tests: `motions > ; and , after t/T continue past the adjacent occurrence`, `motions > comma after failed backward searches uses the failed search state`, `motions > t/T repeat skips only an immediately adjacent match`, `motions > ; after a failed search repeats the failed target as a no-op`, and differential cases under `search-state/*`.
|
|
46
|
+
- Differential insert cases end with `Escape` because `nvim_feedkeys(..., "xt", ...)` does not reliably return control for a live insert session. This is a harness limitation, not an engine divergence; live insert state is covered by unit tests.
|
|
47
|
+
|
|
48
|
+
## Not divergences (scope limits)
|
|
49
|
+
|
|
50
|
+
- Motions, insert mode, and the normal-mode operators `d c y > < gu gU ~` are implemented in 0.4.0, including the unnamed register and one undo block per change. Text objects, visual mode, `p`/`P`, `x`/`X`, `D`/`C`/`S`/`s`/`r`, `u`/`Control-r`, dot-repeat, named registers, marks, search patterns, and macros are **not implemented**. Their keys are unrecognized until their slices land.
|
|
51
|
+
- The token vocabulary accepts `Enter`, `Backspace`, `Delete`, `Tab`, and `Control-<char>` so the contract and content format are stable. Unsupported tokens are reported `recognized: false` in normal mode; unsupported special/control tokens are also `recognized: false` in insert mode.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Amir Manshadi and the vim-villain contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,299 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @vim-villain/engine
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A pure, deterministic TypeScript Vim simulator for [vim-villain](https://github.com/vim-villain). The engine is the shared domain model used by the browser renderer and the server-side replay validator.
|
|
4
|
+
|
|
5
|
+
**Current release: 0.4.0 — motions, insert mode, and normal-mode operators.** Text objects, visual mode, paste, `x`/`X`/`r`, undo/redo commands, and dot-repeat are not implemented yet. Their state fields are reserved so the contract can grow without replacing the state object.
|
|
6
|
+
|
|
7
|
+
Release roadmap:
|
|
8
|
+
|
|
9
|
+
- `0.2` — normal-mode motions and character searches
|
|
10
|
+
- `0.3` — insert mode
|
|
11
|
+
- `0.4` — normal-mode operators, unnamed register, one undo block per change (this release)
|
|
12
|
+
- next — text objects
|
|
13
|
+
- then — visual mode
|
|
14
|
+
- then — paste, remaining edits, undo/redo commands, dot-repeat
|
|
15
|
+
|
|
16
|
+
- No DOM, I/O, network, clock, randomness, or global mutable state
|
|
17
|
+
- Same engine version + state + key sequence → identical state everywhere
|
|
18
|
+
- Returned state is plain JSON-serializable data
|
|
19
|
+
- Neovim 0.11.6 is the correctness oracle; intentional differences are listed in [DIVERGENCES.md](./DIVERGENCES.md)
|
|
20
|
+
|
|
21
|
+
## Install
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install @vim-villain/engine
|
|
25
|
+
# or
|
|
26
|
+
bun add @vim-villain/engine
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The package is ESM-only and ships compiled JavaScript plus type declarations.
|
|
30
|
+
|
|
31
|
+
For local development:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
bun install
|
|
35
|
+
bun run build
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Quick start
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
import { applyKeys, initialState, step } from "@vim-villain/engine";
|
|
42
|
+
|
|
43
|
+
const start = initialState({
|
|
44
|
+
buffer: ["the quick brown fox", "jumps over", "the lazy dog"],
|
|
45
|
+
cursor: { line: 0, col: 4 },
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
const one = step(start, "w");
|
|
49
|
+
console.log(one.state.cursor); // { line: 0, col: 8 }
|
|
50
|
+
console.log(one.recognized); // true
|
|
51
|
+
console.log(one.changed); // false
|
|
52
|
+
|
|
53
|
+
const result = applyKeys(start, ["2", "j", "w"]);
|
|
54
|
+
console.log(result.state.cursor);
|
|
55
|
+
console.log(result.results); // one metadata entry per keystroke
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
`step` and `applyKeys` never mutate their input. If an unsupported or invalid key is supplied, the engine returns a deterministic no-op with `recognized: false`; it does not throw.
|
|
59
|
+
|
|
60
|
+
## API
|
|
61
|
+
|
|
62
|
+
### `initialState(options?)`
|
|
63
|
+
|
|
64
|
+
```ts
|
|
65
|
+
interface InitialStateOptions {
|
|
66
|
+
buffer?: readonly string[]; // default [""]
|
|
67
|
+
cursor?: Position; // default { line: 0, col: 0 }
|
|
68
|
+
mode?: Mode; // default "normal"
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
interface Position {
|
|
72
|
+
line: number;
|
|
73
|
+
col: number;
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
- The buffer always has at least one line; an empty array becomes `[""]`.
|
|
78
|
+
- Lines must not contain `\n`; use separate array entries.
|
|
79
|
+
- The cursor is clamped into the buffer. Normal/visual mode clamps to the last character; insert mode permits column `line.length`.
|
|
80
|
+
- `mode` may be initialized to `insert`, `visual`, or `visual-line` for renderer state. Insert-mode entry/editing is implemented in 0.4.0; visual mode is not. `Escape` returns either mode to normal.
|
|
81
|
+
|
|
82
|
+
### `step(state, key)`
|
|
83
|
+
|
|
84
|
+
```ts
|
|
85
|
+
interface StepResult {
|
|
86
|
+
state: State; // new state; input is untouched
|
|
87
|
+
recognized: boolean; // was this token consumed in this context?
|
|
88
|
+
mode: Mode; // resulting mode
|
|
89
|
+
changed: boolean; // did the buffer change during this key?
|
|
90
|
+
cursor: Position; // resulting cursor (also state.cursor)
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
`key` is exactly one token from the vocabulary below. An unrecognized token still counts as one keystroke.
|
|
95
|
+
|
|
96
|
+
### `applyKeys(state, keys)`
|
|
97
|
+
|
|
98
|
+
```ts
|
|
99
|
+
interface StepInfo {
|
|
100
|
+
recognized: boolean;
|
|
101
|
+
mode: Mode;
|
|
102
|
+
changed: boolean;
|
|
103
|
+
cursor: Position;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
interface ApplyKeysResult {
|
|
107
|
+
state: State;
|
|
108
|
+
results: StepInfo[]; // one entry per input token, in order
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
`results[i]` describes the effect of `keys[i]`; the final state is `result.state`.
|
|
113
|
+
|
|
114
|
+
## Key token vocabulary
|
|
115
|
+
|
|
116
|
+
Exactly one token per keystroke:
|
|
117
|
+
|
|
118
|
+
| Kind | Form | Examples |
|
|
119
|
+
|---|---|---|
|
|
120
|
+
| Printable | one Unicode code point | `"a"`, `"3"`, `" "`, `"é"` |
|
|
121
|
+
| Special | documented name | `Escape`, `Enter`, `Backspace`, `Delete`, `Tab` |
|
|
122
|
+
| Modifier | `Control-<char>` | `Control-r` |
|
|
123
|
+
|
|
124
|
+
The vocabulary is broader than the 0.4.0 command set. In normal mode, `Escape`, the motions documented below, the insert entry commands `i a I A o O`, and the operators `d c y > < gu gU ~` are recognized. In insert mode, printable characters, `Enter`, `Tab`, `Backspace`, `Delete`, and `Escape` are recognized. Other vocabulary tokens are unrecognized no-ops until later releases implement them; they are deliberately reported as `recognized: false`.
|
|
125
|
+
|
|
126
|
+
A string that is not a valid token (for example `"abc"`, `""`, or `"F1"`) is treated as one unrecognized keystroke, never an exception.
|
|
127
|
+
|
|
128
|
+
## State shape
|
|
129
|
+
|
|
130
|
+
All fields are JSON-serializable. Fields marked “reserved” are part of the serialized schema but are not active until a later release.
|
|
131
|
+
|
|
132
|
+
| Field | Meaning |
|
|
133
|
+
|---|---|
|
|
134
|
+
| `buffer: string[]` | Buffer lines, always at least one |
|
|
135
|
+
| `cursor: Position` | Zero-based line and code-point column |
|
|
136
|
+
| `mode: Mode` | `normal`, `insert`, `visual`, or `visual-line` |
|
|
137
|
+
| `pendingCount: number` | Count being accumulated; `0` means none |
|
|
138
|
+
| `preferredColumn: number \| null` | Column retained across consecutive `j`/`k`; `MAX_COUNT` represents Vim's MAXCOL after `$` |
|
|
139
|
+
| `pendingOperator: Operator \| null` | The operator waiting for a motion or doubled key, or `null` |
|
|
140
|
+
| `pendingOperatorCount: number` | Count entered before the pending operator; `0` means none |
|
|
141
|
+
| `pendingRegister: string \| null` | Reserved for named registers; always `null` in 0.4.0 |
|
|
142
|
+
| `pendingG: boolean` | A `g` prefix is pending |
|
|
143
|
+
| `pendingFind` | Pending `f`/`t`/`F`/`T` target and count, or `null` |
|
|
144
|
+
| `pendingTextObject` | Reserved for text objects |
|
|
145
|
+
| `lastFind` | Last character search command and target character, including failed searches |
|
|
146
|
+
| `visualAnchor`, `visualEndAtEol` | Reserved for visual mode |
|
|
147
|
+
| `registers.unnamed` | Unnamed register as `{ lines, linewise }`, or `null` before the first yank/delete/change |
|
|
148
|
+
| `undoStack`, `redoStack` | Snapshots populated by buffer-changing commands; the `u`/`Control-r` commands are not implemented yet |
|
|
149
|
+
| `lastChange` | Recorded for future dot-repeat; `.` is not implemented yet |
|
|
150
|
+
| `insert` | Active insert session, including count, recorded insertion tokens, and autoindent bookkeeping; `null` outside insert mode |
|
|
151
|
+
| `record` | Engine bookkeeping for the current command; opaque |
|
|
152
|
+
| `replaying` | Engine bookkeeping for dot-repeat; opaque |
|
|
153
|
+
|
|
154
|
+
The returned state from one engine version is valid input to `step` in a later version only within the same major version. Attempts do not persist state; they persist the initial state and key log.
|
|
155
|
+
|
|
156
|
+
## Implemented commands (0.4.0)
|
|
157
|
+
|
|
158
|
+
Motions and character searches are normal-mode commands. Insert mode entry commands are listed in the insert-mode section.
|
|
159
|
+
|
|
160
|
+
### Motions
|
|
161
|
+
|
|
162
|
+
| Command | Behavior |
|
|
163
|
+
|---|---|
|
|
164
|
+
| `h`, `l` | Left/right within the line, clamped; counts supported |
|
|
165
|
+
| `j`, `k` | Up/down by lines; column clamped; counts supported |
|
|
166
|
+
| `w`, `b`, `e` | Word start/previous start/end using the fixed ASCII word class |
|
|
167
|
+
| `W`, `B`, `E` | Whitespace-delimited WORD start/previous start/end |
|
|
168
|
+
| `0` | Column 0 |
|
|
169
|
+
| `^` | First non-blank character; counts are ignored, as in Vim |
|
|
170
|
+
| `$` | Last character; a count moves to the end of the counted line |
|
|
171
|
+
| `gg` | First line; a count selects `count - 1` (clamped) |
|
|
172
|
+
| `G` | Last line or counted line, clamped |
|
|
173
|
+
| `f`, `t`, `F`, `T` | Character search on the current line |
|
|
174
|
+
| `;`, `,` | Repeat the last character search in the same/reverse direction |
|
|
175
|
+
|
|
176
|
+
Counts are supported on every listed motion. `0` is a motion only when no count is pending; while a count is pending it is a digit (`20j` means count 20). A single count is capped at `MAX_COUNT = 9999`.
|
|
177
|
+
|
|
178
|
+
`gg`/`G` preserve the current column when possible, matching Neovim with `nostartofline` and a valid cursor. The column is clamped to the target line. They do not always move to column 0.
|
|
179
|
+
|
|
180
|
+
`$` with a count performs a downward line motion first. If the cursor is on the last line (including a one-line buffer) and the count is greater than 1, the whole motion is a no-op. A successful `$` remembers an end-of-line preferred column, so a following `j`/`k` goes to the end of the target line.
|
|
181
|
+
|
|
182
|
+
### Character searches
|
|
183
|
+
|
|
184
|
+
- `f`/`t` search forward; `F`/`T` search backward. `t`/`T` stop before/after the found character.
|
|
185
|
+
- Searches stay on the current line. A failed search is a recognized no-op that leaves the cursor in place.
|
|
186
|
+
- Every explicit search records `lastFind`, including a failed one. A failed search therefore replaces the repeat target; `;` then repeats the failed search as a no-op.
|
|
187
|
+
- `;` repeats from the current cursor. For a count-1 `t`/`T` repeat, Vim ignores a matching character immediately adjacent to the cursor to force a move; the engine does the same. This is why `to;` continues to the next occurrence even though `to` itself stopped in front of the first one.
|
|
188
|
+
- `,` reverses the stored direction. Repeats do not update `lastFind`.
|
|
189
|
+
- `;`/`,` with no previous search are recognized no-ops.
|
|
190
|
+
|
|
191
|
+
### Insert mode
|
|
192
|
+
|
|
193
|
+
Entry commands from normal mode:
|
|
194
|
+
|
|
195
|
+
| Command | Behavior |
|
|
196
|
+
|---|---|
|
|
197
|
+
| `i` | Insert before the cursor |
|
|
198
|
+
| `a` | Insert after the cursor; on an empty line, at column 0 |
|
|
199
|
+
| `I` | Insert at the first non-blank; on a whitespace-only line, at end of line |
|
|
200
|
+
| `A` | Insert at end of line |
|
|
201
|
+
| `o` | Open an autoindented line below and insert there |
|
|
202
|
+
| `O` | Open an autoindented line above and insert there |
|
|
203
|
+
|
|
204
|
+
Insert-mode tokens:
|
|
205
|
+
|
|
206
|
+
| Token | Behavior |
|
|
207
|
+
|---|---|
|
|
208
|
+
| printable character | Insert the code point at the cursor |
|
|
209
|
+
| `Enter` | Split the line; the new line receives autoindent and the text after the cursor |
|
|
210
|
+
| `Tab` | Insert spaces using the fixed `expandtab`/`smarttab` configuration described below |
|
|
211
|
+
| `Backspace` | Delete before the cursor; at column 0, join with the previous line |
|
|
212
|
+
| `Delete` | Delete at the cursor; at end of line, join with the next line |
|
|
213
|
+
| `Escape` | End the session, move one code point left (clamped at 0), and finalize one undo block |
|
|
214
|
+
|
|
215
|
+
- A count on `i`, `a`, `I`, or `A` repeats the inserted token sequence on `Escape`. For example, `3iX<Esc>` inserts `XXX`; multi-line sequences and edits such as `Backspace`/`Delete` are replayed too.
|
|
216
|
+
- A count on `o` or `O` opens that many lines and replays the insertion on each line. Extra counted `O` lines are opened below the first inserted block, matching Neovim.
|
|
217
|
+
- Autoindent is always on: `Enter`, `o`, and `O` copy the current line's leading indentation. Under the reference's `expandtab` setting, leading tabs are expanded to spaces with the same display width.
|
|
218
|
+
- If an autoindented line is left untouched and contains only its indentation, `Escape` removes that indentation. Text typed on the line keeps it; this matches Neovim.
|
|
219
|
+
- `Backspace` at the first non-blank removes the whole leading indent in one step (`backspace=indent`). Inside the indent it deletes one code point; at column 0 it joins with the previous line.
|
|
220
|
+
- `Delete` at end of line joins the next line without stripping its indentation.
|
|
221
|
+
- `Tab` follows the fixed reference configuration: `expandtab`, `smarttab`, `softtabstop=0`, `tabstop=8`, `shiftwidth=2`. In leading whitespace it advances to the next shift-width boundary; elsewhere it advances to the next tab stop. It inserts spaces, not a literal tab.
|
|
222
|
+
- In insert mode the cursor may equal the line length (the append position). `Escape` and any transition back to normal mode clamp the cursor to the last character.
|
|
223
|
+
- Unknown insert-mode tokens (for example `Control-x`) are deterministic no-ops: the session stays active, the token is counted, and `recognized` is `false`.
|
|
224
|
+
- An insert session is one undo block: `undoStack` receives the pre-entry snapshot once on `Escape`, including counted insertions. The `u` command is not implemented yet.
|
|
225
|
+
- `R`, `r`, replace mode, abbreviations, and completion are not implemented.
|
|
226
|
+
|
|
227
|
+
### Operators (0.4.0)
|
|
228
|
+
|
|
229
|
+
| Command | Behavior |
|
|
230
|
+
|---|---|
|
|
231
|
+
| `d` | Delete the range into the unnamed register |
|
|
232
|
+
| `c` | Delete the range, write the register, and enter insert mode |
|
|
233
|
+
| `y` | Yank the range into the unnamed register without changing the buffer |
|
|
234
|
+
| `>` / `<` | Shift covered lines right/left by `SHIFT_WIDTH` (2 spaces) |
|
|
235
|
+
| `gu` / `gU` | Lower/upper-case the range using ASCII-only conversion |
|
|
236
|
+
| `~` | Toggle the case of `count` characters, advancing along the line |
|
|
237
|
+
|
|
238
|
+
- Doubled forms: `dd`, `cc`, `yy`, `>>`, `<<`, `guu`, `gUU`. A count before and after the operator multiply as in Vim (`2d3w` is six words), capped by `MAX_COUNT`.
|
|
239
|
+
- `j`, `k`, `gg`, and `G` produce linewise ranges. `w`/`W` use Vim's operator rules: the range stops at end of line when the motion reaches the last word, and counted forms can cross a newline unless the endpoint is the first non-blank of the next line.
|
|
240
|
+
- `cw`/`cW` are special-cased like Vim: on a non-blank they change to the end of the current word, or only the current character when it is already the word's last character; on blanks they use `w`/`W`; with a count they change whole words without trailing whitespace.
|
|
241
|
+
- `f`/`t` are inclusive/exclusive exactly as their motions are. Failed searches and failed vertical motions make the operator a no-op.
|
|
242
|
+
- A linewise delete preserves the original cursor column, clamped to the new line. A linewise yank keeps the cursor on the range's first line and column. `y` never changes the buffer.
|
|
243
|
+
- `d`/`c`/`y` write the unnamed register with a `linewise` flag. Indent, case, and `~` leave the register untouched.
|
|
244
|
+
- Valid zero-width ranges follow Vim: `d0` at column 0 is a no-op, `y0` sets the empty charwise register, and `c0`/`ch`/`cl` enter insert mode without deleting. `c` with a truly failed motion (`cj` on the last line, failed `cf`) is a no-op.
|
|
245
|
+
- On an empty line in a multi-line buffer, `dw`, `yw`, and `cw` behave linewise (`cw` changes the line and enters insert). On a one-line empty buffer, `yw` sets the empty charwise register, `dw` is a no-op, and `cw` inserts.
|
|
246
|
+
- A counted linewise operator is a no-op when the clamped range would still be one line (`2dd` on a one-line buffer, `2yy` on the last line).
|
|
247
|
+
- An operator and, for `c`, its insertion form one undo block. The `u` command is not implemented yet.
|
|
248
|
+
- Text objects, visual mode, `p`/`P`, `x`/`X`, `D`/`C`/`S`/`s`/`r`, and dot-repeat are not implemented.
|
|
249
|
+
|
|
250
|
+
### Word and line details
|
|
251
|
+
|
|
252
|
+
- Word motions cross lines.
|
|
253
|
+
- For `w`, an empty line is a valid stop; `e` skips empty lines while looking for the next word end and falls back to the last character of the buffer when no word follows.
|
|
254
|
+
- The engine's word class is fixed and runtime-independent: ASCII letters, digits, and `_`; all other non-blanks are punctuation. `W`/`B`/`E` use non-blank runs. Neovim's `iskeyword` is broader; see [DIVERGENCES.md](./DIVERGENCES.md).
|
|
255
|
+
|
|
256
|
+
## Counts, pending input, and unknown keys
|
|
257
|
+
|
|
258
|
+
- Digits `1`–`9` start a count; subsequent digits append. With a pending count, `0` appends.
|
|
259
|
+
- `Escape` cancels pending counts/prefixes and is always recognized in normal mode.
|
|
260
|
+
- `f`/`t`/`F`/`T` accept one printable target character. `Escape` cancels. Any other token terminates the pending search, clears pending input, and is reported `recognized: false`.
|
|
261
|
+
- A `g` prefix waits for another `g`. `Escape` cancels; any other token clears the prefix and is reported `recognized: false`.
|
|
262
|
+
- Any unsupported key clears pending count/operator/prefix state deterministically. It never partially applies a command.
|
|
263
|
+
- In insert mode, unknown printable/special tokens are no-ops that keep the session active and are reported `recognized: false`. `Escape` always terminates insert mode.
|
|
264
|
+
- Insertion state lives in `State.insert` and is JSON-serializable; it is cleared when insert mode ends, including when `Escape` follows a pending state.
|
|
265
|
+
|
|
266
|
+
## Cursor and buffer semantics
|
|
267
|
+
|
|
268
|
+
- Positions are zero-based.
|
|
269
|
+
- Columns are **Unicode code-point indices**, not UTF-8 byte columns and not UTF-16 code units. This intentionally differs from Neovim's byte columns; the differential harness converts.
|
|
270
|
+
- Normal-mode and visual cursors are clamped to an existing character; an empty line has column 0.
|
|
271
|
+
- Insert mode may place the cursor one past the last character (the append position). Leaving insert mode clamps it back to the last character.
|
|
272
|
+
- Buffer lines never contain newlines. Empty lines are empty strings.
|
|
273
|
+
- Case conversion is ASCII-only, word classes are fixed ASCII classes, and indentation constants are fixed in the engine; none consult the runtime/locale.
|
|
274
|
+
|
|
275
|
+
## Determinism and versioning
|
|
276
|
+
|
|
277
|
+
`ENGINE_VERSION` mirrors the package version (currently `0.4.0`). Observable behavior is the API: if a change can alter the result for an existing state/key sequence, it is a versioned change.
|
|
278
|
+
|
|
279
|
+
- **Major**: incompatible state/API/behavior changes.
|
|
280
|
+
- **Minor**: new commands, modes, or state fields that do not change existing replay outcomes.
|
|
281
|
+
- **Patch**: no observable behavior change.
|
|
282
|
+
|
|
283
|
+
The Neovim oracle is pinned to `NEOVIM_REFERENCE_VERSION = 0.11.6`. Upgrading it is a deliberate change with differential-corpus updates.
|
|
284
|
+
|
|
285
|
+
## Development
|
|
286
|
+
|
|
287
|
+
```bash
|
|
288
|
+
bun install
|
|
289
|
+
bun test # unit tests only; no Neovim required
|
|
290
|
+
bun run typecheck
|
|
291
|
+
bun run build
|
|
292
|
+
bun run test:differential # Neovim 0.11.6; skips cleanly if unavailable
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
See [CONTRIBUTING.md](./CONTRIBUTING.md) for the test layout, differential corpus format, and rules for adding commands.
|
|
296
|
+
|
|
297
|
+
## License
|
|
298
|
+
|
|
299
|
+
MIT © 2026 Amir Manshadi and the vim-villain contributors. See [LICENSE](./LICENSE).
|
package/dist/buffer.d.ts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { Position } from "./types.js";
|
|
2
|
+
/** Split a string into Unicode code points. */
|
|
3
|
+
export declare function toChars(value: string): string[];
|
|
4
|
+
/** Length of a string in Unicode code points. */
|
|
5
|
+
export declare function lineLength(line: string): number;
|
|
6
|
+
/** True for spaces and tabs, the characters Vim treats as blanks within a line. */
|
|
7
|
+
export declare function isBlankCharacter(char: string): boolean;
|
|
8
|
+
/** True when the line is empty or contains only spaces/tabs. */
|
|
9
|
+
export declare function isBlankLine(line: string): boolean;
|
|
10
|
+
/** Column of the first non-blank character, or the line length when blank. */
|
|
11
|
+
export declare function firstNonBlank(line: string): number;
|
|
12
|
+
/** True when a position is inside the logical buffer (virtual EOL allowed). */
|
|
13
|
+
export declare function isValidPosition(buffer: readonly string[], position: Position): boolean;
|
|
14
|
+
export declare function clonePosition(position: Position): Position;
|
|
15
|
+
export declare function positionsEqual(a: Position, b: Position): boolean;
|
|
16
|
+
export declare function comparePositions(a: Position, b: Position): number;
|
|
17
|
+
/** Clamp a line number into the buffer. */
|
|
18
|
+
export declare function clampLine(buffer: readonly string[], line: number): number;
|
|
19
|
+
/**
|
|
20
|
+
* Clamp a cursor position.
|
|
21
|
+
*
|
|
22
|
+
* `allowEol` permits column == line length (insert mode). Otherwise the cursor
|
|
23
|
+
* is clamped to the last character; an empty line has column 0.
|
|
24
|
+
*/
|
|
25
|
+
export declare function clampPosition(buffer: readonly string[], position: Position, allowEol: boolean): Position;
|
|
26
|
+
/** Clamp a buffer-internal line/column for operator endpoints (virtual EOL allowed). */
|
|
27
|
+
export declare function clampEndpoint(buffer: readonly string[], position: Position): Position;
|
|
28
|
+
/**
|
|
29
|
+
* The character at a position, or `"\n"` for a virtual end-of-line/empty line.
|
|
30
|
+
* Line boundaries are treated as newline characters by word motions.
|
|
31
|
+
*/
|
|
32
|
+
export declare function charAt(buffer: readonly string[], position: Position): string;
|
|
33
|
+
/** The position immediately to the right, or null at end of buffer. */
|
|
34
|
+
export declare function nextPosition(buffer: readonly string[], position: Position): Position | null;
|
|
35
|
+
/** The position immediately to the left, or null at start of buffer. */
|
|
36
|
+
export declare function previousPosition(buffer: readonly string[], position: Position): Position | null;
|
|
37
|
+
/** Last character position of a line (never virtual). */
|
|
38
|
+
export declare function lastCharacterPosition(buffer: readonly string[], line: number): Position;
|
|
39
|
+
/** Last character position of the whole buffer. */
|
|
40
|
+
export declare function lastBufferPosition(buffer: readonly string[]): Position;
|
|
41
|
+
/** Text in `[start, end)` with newlines between lines. */
|
|
42
|
+
export declare function textBetween(buffer: readonly string[], start: Position, end: Position): string;
|
|
43
|
+
/** Replace the code-point range `[start, end)` with `text` (which may contain newlines). */
|
|
44
|
+
export declare function replaceText(buffer: readonly string[], start: Position, end: Position, text: string): string[];
|
|
45
|
+
/** Insert text at a position, splitting lines on `\n`. */
|
|
46
|
+
export declare function insertText(buffer: readonly string[], position: Position, text: string): string[];
|
|
47
|
+
/** Remove the code-point range `[start, end)`. */
|
|
48
|
+
export declare function deleteText(buffer: readonly string[], start: Position, end: Position): string[];
|
|
49
|
+
/** Codepoint slice of a single line. */
|
|
50
|
+
export declare function sliceLine(line: string, start: number, end: number): string;
|
|
51
|
+
/** Buffers are equal when all lines are identical. */
|
|
52
|
+
export declare function buffersEqual(a: readonly string[], b: readonly string[]): boolean;
|
|
53
|
+
/** True when `[start, end)` contains no positions. */
|
|
54
|
+
export declare function isEmptyRange(start: Position, end: Position): boolean;
|
|
55
|
+
//# sourceMappingURL=buffer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buffer.d.ts","sourceRoot":"","sources":["../src/buffer.ts"],"names":[],"mappings":"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"}
|