Skip to content

Repository files navigation

opencode-vim

Adds Vim-style insert and normal mode editing to the OpenCode prompt.

Demo

Installation

Install from the CLI:

opencode plugin opencode-vim@latest --global

Supported Keys

KeyBehavior
<Esc>, <C-[>Enter normal mode
i, a, A, o, OReturn to insert mode
h, j, k, l, w, b, e, $, 0Move through the prompt
x, d, c, y, p, u, <C-r>Edit, yank, paste, undo, redo
v, VVisual and visual-line selection
3w, diw, ci", yiq, dip, yibCounts and text objects
k, j on an empty promptBrowse previous and next prompts
<CR> in normal modeSubmit the prompt (configurable)
/vimToggle Vim mode on or off

Custom Keymaps

Keymaps can change modes, submit the prompt, run Vim key sequences, or dispatch active OpenCode commands with the command: prefix.

"normal": {
"Y": "y$",
"q": "command:session.new"
}

See Keymap Actions for available actions and commands, or Configuration for all options.

About

No description, website, or topics provided.

Resources

Stars

20 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages