@kungfusaini/opencode-vim-modeOpenCode TUI plugin that adds Vim-style modal editing, message selection, and prompt visual mode.
0
40
9 in 7 days
26.2
Multi-signal model
2 months ago
2026-06-08
Install and configure
opencode.jsonWrites to this project's opencode.json — applies to this repository only.
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@kungfusaini/opencode-vim-mode@0.1.3"]
}Writes to ~/.config/opencode/opencode.json — applies to every project.
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@kungfusaini/opencode-vim-mode@0.1.3"]
}If you want to modify the plugin locally, install it into the project and reference the local path.
shell
pnpm add -D @kungfusaini/opencode-vim-modeopencode loads npm dependencies through its embedded runtime on startup and caches them locally — no manual global install needed.
@kungfusaini/opencode-vim-mode is an OpenCode TUI plugin that adds a practical Vim-style modal layer to the prompt without patching OpenCode itself.
It is designed for people who want a more Vim-like OpenCode experience while still using the built-in TUI.
Features
Modal prompt editing
- insert and normal modes
- prompt mode badge in the footer
- startup defaults to insert mode
Normal-mode prompt motions and editing
h/lmove left and rightj/kare context-sensitive:- move inside multiline prompt input when possible
- otherwise scroll the pane
w/b,0/$a,A,Ix,dd,dw,db,Dcc,cw,cb,Cppaste from clipboard
Prompt visual mode
vcharacterwise visual mode in the input boxVlinewise visual mode in the input boxy,d,cfor selected prompt text
Message navigation and actions
J/Kselect next and previous visible messagesgg/Gjump to first and last message- selected message highlight
Enteropens message actions for an explicitly selected message- message actions currently include:
- Revert
- Copy
- Fork
Scrolling
ctrl+uhalf-page upctrl+dhalf-page down
Install
Use the normal OpenCode plugin installation path by adding the package to your tui.json plugin list:
{
"$schema": "https://opencode.ai/tui.json",
"plugin": [
"@kungfusaini/opencode-vim-mode"
]
}
Then restart OpenCode.
Notes
ctrl+din normal mode is repurposed for Vim-style half-page down while the prompt is focused, so usectrl+cor your other quit bindings to exit.Enterfor message actions only works when a message is actively selected withJ,K,gg, orG.- This plugin intentionally leans on current OpenCode/OpenTUI behavior and should be considered experimental.
Compatibility
- tested against OpenCode 1.15.x TUI behavior
License
MIT