Skip to main content
OpenCode provides vim-style keyboard shortcuts and intuitive key bindings for efficient navigation and control.

Global shortcuts

These shortcuts work throughout the application:
Press Ctrl+? at any time to see context-sensitive shortcuts based on your current location in the application.

Chat page shortcuts

When in the main chat interface:
The i key only focuses the editor when you’re not already typing. This mimics vim’s insert mode behavior.

Editor shortcuts

When the message editor is focused:
Use Ctrl+E to compose longer messages in your preferred editor like vim or nano. OpenCode creates a temporary markdown file for editing.

Message navigation

Navigate through the conversation history:
These vim-style navigation keys (b, f, Ctrl+U, Ctrl+D) work throughout the message area for efficient scrolling.

Session dialog shortcuts

When the session switcher is open (Ctrl+S):

Model dialog shortcuts

When the model selection dialog is open (Ctrl+O):
Use the horizontal navigation (h/l or arrow keys) to quickly browse models from different providers like OpenAI, Anthropic, and Google.

Permission dialog shortcuts

When the AI requests permission to perform an action:
The permission dialog displays diffs, commands, or URLs for you to review before approving. Use the viewport navigation shortcuts to scroll through large previews.

Command dialog shortcuts

When the command palette is open (Ctrl+K):

Theme dialog shortcuts

When the theme switcher is open (Ctrl+T):

File picker shortcuts

When the file picker is open (Ctrl+F):

Logs page shortcuts

When viewing logs (Ctrl+L):

Completion dialog shortcuts

When using the @ completion feature:
Type @ in the editor to autocomplete file and folder names, making it easy to reference specific files in your messages.

Vim-style navigation summary

OpenCode embraces vim keybindings for familiarity:

Movement

  • j / k for up/down
  • h / l for left/right
  • Ctrl+U / Ctrl+D for half-page scrolls

Modes

  • i to enter insert mode (focus editor)
  • Esc to exit insert mode
  • ? for help (similar to vim’s :help)

Quick reference table

Print this table for quick reference:
Custom keybindings are not currently supported, but shortcuts follow common terminal application conventions and vim patterns for familiarity.