opencode-vim 0.0.22 → 0.0.24
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/README.md +25 -63
- package/assets/vim-in-motion-dialogs.gif +0 -0
- package/dist/tui.js +3326 -0
- package/docs/configuration.md +50 -400
- package/docs/keymap-actions.md +60 -188
- package/docs/vim-behavior.md +93 -0
- package/package.json +6 -6
- package/src/modules/snippets/index.tsx +0 -17
- package/src/modules/snippets/loader.ts +0 -147
- package/src/modules/snippets/search.ts +0 -118
- package/src/modules/snippets/skill-loader.ts +0 -81
- package/src/modules/snippets/state.ts +0 -40
- package/src/modules/snippets/trigger.ts +0 -68
- package/src/modules/snippets/types.ts +0 -50
- package/src/modules/snippets/view.tsx +0 -674
- package/src/modules/vim/actions.ts +0 -85
- package/src/modules/vim/config.ts +0 -125
- package/src/modules/vim/edit.test.ts +0 -51
- package/src/modules/vim/edit.ts +0 -33
- package/src/modules/vim/graphemes.ts +0 -38
- package/src/modules/vim/index.tsx +0 -200
- package/src/modules/vim/keys.ts +0 -38
- package/src/modules/vim/log.ts +0 -37
- package/src/modules/vim/map.test.ts +0 -45
- package/src/modules/vim/map.ts +0 -198
- package/src/modules/vim/state.test.ts +0 -18
- package/src/modules/vim/state.tsx +0 -46
- package/src/modules/vim/view.tsx +0 -130
- package/src/modules/vim/vimee.test.ts +0 -211
- package/src/modules/vim/vimee.ts +0 -1146
- package/src/plugin.tsx +0 -116
- package/src/prompt/host.tsx +0 -38
- package/src/prompt/modules.ts +0 -16
- package/src/prompt/root.tsx +0 -69
- package/src/prompt/types.ts +0 -42
- package/src/update.ts +0 -120
- package/tui.tsx +0 -275
- package/view.tsx +0 -29
package/README.md
CHANGED
|
@@ -1,81 +1,43 @@
|
|
|
1
1
|
# opencode-vim
|
|
2
2
|
|
|
3
|
-
Vim-style editing for
|
|
3
|
+
Vim-style prompt editing and session navigation for OpenCode 2.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
keymaps, prompt history, command dispatch, cursor styles, and `/vim` toggling.
|
|
7
|
-
The mode indicator appears before the working directory in the prompt footer.
|
|
8
|
-
Pending key sequences stay hidden so they do not shift the footer layout.
|
|
5
|
+

|
|
9
6
|
|
|
10
|
-
|
|
7
|
+
## Installation
|
|
11
8
|
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
"plugins": [
|
|
15
|
-
"opencode-vim@file:/home/dan/src/opencode-config/plugin/opencode-vim"
|
|
16
|
-
]
|
|
17
|
-
}
|
|
9
|
+
```sh
|
|
10
|
+
opencode plugin add opencode-vim@latest
|
|
18
11
|
```
|
|
19
12
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
```json
|
|
23
|
-
{
|
|
24
|
-
"package": "opencode-vim@file:/home/dan/src/opencode-config/plugin/opencode-vim",
|
|
25
|
-
"options": {
|
|
26
|
-
"vim": {
|
|
27
|
-
"defaultMode": "insert",
|
|
28
|
-
"keymapTimeout": 500,
|
|
29
|
-
"keymaps": {
|
|
30
|
-
"insert": { "kj": "normal" },
|
|
31
|
-
"normal": { "Y": "y$" }
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
```
|
|
13
|
+
## Updating
|
|
37
14
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
15
|
+
```sh
|
|
16
|
+
opencode plugin update opencode-vim@latest
|
|
17
|
+
```
|
|
41
18
|
|
|
42
|
-
|
|
19
|
+
Restart the terminal UI after updating to load the new version.
|
|
43
20
|
|
|
44
|
-
|
|
45
|
-
support Vim editing in their search fields. Each new dialog starts in your
|
|
46
|
-
configured `defaultMode`.
|
|
21
|
+
## Usage
|
|
47
22
|
|
|
48
|
-
|
|
49
|
-
- In normal mode, `j`/`k` move the selected list item. `h`/`l`, `x`, `dw`, `u`,
|
|
50
|
-
and other editing commands act on the search text. `i` returns to insert mode.
|
|
51
|
-
- `Enter` selects the highlighted item; `Esc` in idle normal mode closes or goes
|
|
52
|
-
back. Arrows, Tab, Home/End, and Page Up/Down keep their dialog behavior.
|
|
53
|
-
- Dialog editing has separate mode and undo state from the main prompt.
|
|
23
|
+
Press `Esc` to enter normal mode and `i` to type again in insert mode.
|
|
54
24
|
|
|
55
|
-
|
|
25
|
+
In a session, press `s` from normal mode to browse messages and tools. Use `j`/`k`
|
|
26
|
+
to navigate, `Enter` to open an item, and `s` to return to the prompt.
|
|
56
27
|
|
|
57
|
-
|
|
28
|
+
Use `/vim` to toggle the plugin on or off.
|
|
58
29
|
|
|
59
|
-
|
|
60
|
-
npm install
|
|
61
|
-
npm test
|
|
62
|
-
npm run typecheck
|
|
63
|
-
npm run bench
|
|
64
|
-
```
|
|
30
|
+
## Development
|
|
65
31
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
is installed, additional tests compare text and cursor results against headless
|
|
70
|
-
Neovim with user configuration disabled.
|
|
32
|
+
Run `npm ci` and `bun run build` before loading this checkout as a local plugin.
|
|
33
|
+
Rebuild after changing source files. The published entrypoint compiles JSX and
|
|
34
|
+
uses OpenCode's shared UI runtime.
|
|
71
35
|
|
|
72
|
-
|
|
73
|
-
|
|
36
|
+
`bun run test` checks both source loading and the packed npm plugin under
|
|
37
|
+
`node_modules`, including mode updates, session browsing, clipboard and cleanup.
|
|
74
38
|
|
|
75
|
-
|
|
76
|
-
OPENCODE_SOURCE=/path/to/opencode npm test -- test/opencode-dialog.test.tsx
|
|
77
|
-
```
|
|
39
|
+
## Documentation
|
|
78
40
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
41
|
+
- [Keybindings and modes](./docs/vim-behavior.md)
|
|
42
|
+
- [Configuration](./docs/configuration.md)
|
|
43
|
+
- [Custom keymaps](./docs/keymap-actions.md)
|
|
Binary file
|