Skip to content

leohenon/opencode-vim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10,894 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Opencode Vim

npm version npm downloads CI Last commit Bun

opencode fork with vim mode. Syncs with upstream releases.

Install

npm

npm i -g @leohenon/ocv

Homebrew

brew install leohenon/tap/ocv

curl

curl -fsSL https://raw.githubusercontent.com/leohenon/opencode-vim/ocv/install.sh | sudo sh

Then run:

ocv

Update

npm i -g @leohenon/ocv@latest
# or
brew upgrade ocv
# or
ocv update

Features

Vim motions

h j k l w b e W B E 0 ^ _ $ gg G i I a A o O R x dd dw cc cw S J yy yw p P v V f F t T ; , Ctrl+e Ctrl+y Ctrl+d Ctrl+u Ctrl+f Ctrl+b

Tip

Toggle via command palette (Ctrl+p -> Toggle vim mode).

Anthropic OAuth

Claude subscriptions built-in with /connect. No plugins or configuration needed.

Copy Mode

Text selection from the chat session view.

Works similarly to tmux copy mode within opencode tui.

  • Enter copy mode with <leader>v.
  • Press v / V to start character-wise or line-wise selection.
  • y yanks to the vim register.
  • Enter copies to the system clipboard.
  • Escape exits visual mode, q exits copy mode.

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

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. H / M / L are supported for viewport-relative navigation.

Warning

Setting prompt_max_height above 40 is not recommended.

Minimal UI

Hides extra UI hints and tips.

Default Minimal

Tip

Toggle via command palette (Ctrl+p -> Toggle minimal ui).

Configuration

Submit behavior

By default, vim insert mode keeps Enter for newlines. If you want Enter to submit instead, add this to tui.json:

{
  "vim_enter_submit": true
}

Feedback

Have a suggestion? Open an issue.

About

The open source coding agent with a full vim engine.

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • TypeScript 58.2%
  • MDX 38.0%
  • CSS 2.9%
  • Rust 0.5%
  • Astro 0.2%
  • JavaScript 0.1%
  • Other 0.1%