npm i -g @leohenon/ocvbrew install leohenon/tap/ocvcurl -fsSL https://raw.githubusercontent.com/leohenon/opencode-vim/ocv/install.sh | sudo shThen run:
ocvnpm i -g @leohenon/ocv@latest
# or
brew upgrade ocv
# or
ocv updateToggle via command palette (Ctrl+p -> Toggle vim mode).
Movement
h j k l w b e W B E 0 ^ _ $ { } gg G
f F t T ; ,
Ctrl+e Ctrl+y Ctrl+d Ctrl+u Ctrl+f Ctrl+b
Note
Unicode word boundaries are not supported.
Editing
i I a A o O R x ~ dd dw db d} d{ cc cw cb C c} c{ S J
yank / put / undo
yy yw y} y{ p P u ctrl+r
- Copy the current prompt selection with
<leader>y(default:ctrl+xtheny). - Configure it with
keybinds.prompt_copy_selection. - If a prompt selection exists,
<leader>ycopies it. Otherwise it keeps the existing message copy behavior. - To sync yanks and pastes with the system clipboard, see System clipboard register.
Visual
v V
Claude subscriptions built-in with /connect. No plugins or configuration needed.
Text selection from the chat session view.
Works similarly to tmux copy mode within opencode tui.
- Enter copy mode with
<leader>v. - Navigate with
hjklor arrow keys (LeftDownUpRight). - Press
v/Vto start character-wise or line-wise selection. y/yyyanks to the vim register.Entercopies to the system clipboard.Escapeexits visual mode,qexits copy mode.zztzzzbadjust copy-mode scroll positioning.H/M/Ljump to the top / middle / bottom of the viewport.
Tip
Configure the entry key with keybinds.copy_mode in your config if you want something other than <leader>v.
Note
Copy mode collapses code diffs into a single column for easy copying.
Prompt input height is configurable with prompt_max_height in tui.json.
When the prompt grows past the visible area, a scrollbar appears automatically.
{
"prompt_max_height": 35,
"prompt_scrollbar": true
}Note
When typing gg / G focus the prompt input.
Warning
Setting prompt_max_height above 40 is not recommended.
Hides extra UI hints and tips.
| Default | Minimal |
|---|---|
![]() |
![]() |
Toggle via command palette (Ctrl+p -> Toggle minimal ui).
By default, vim insert mode keeps Enter for newlines and normal mode uses Enter to submit. If you want Enter to submit from insert mode too, add this to tui.json:
{
"vim_enter_submit": true
}When vim_enter_submit is enabled, line returns are still available through input_newline.
{
"keybinds": {
"input_newline": "alt+return"
}
}If you keep vim_enter_submit disabled but want a separate submit key that works from insert mode, configure input_force_submit:
{
"keybinds": {
"input_force_submit": "alt+return"
}
}By default, input_force_submit is unbound.
By default, vim mode uses an internal register for y and p. If you want yank and paste to use the system clipboard instead, add this to tui.json:
{
"vim_system_clipboard_register": true
}With this enabled, yank operations sync to the system clipboard and p / P paste from it.
Note
Terminal/OS clipboard shortcuts don’t preserve Vim linewise register state. External clipboard text is pasted as characterwise text.
Have a suggestion? Open an issue.





