Set the editor opencode opens for prompts
mcp & integrations
// what it does
/editor (Ctrl+X E) opens your $EDITOR to compose a long or multi-line prompt, then sends it back when you save and quit. Set EDITOR in your shell profile; GUI editors need their wait flag so the process blocks until you close the buffer.
// shortcut
Ctrl+X E
// shell
$ export EDITOR=nvim$ export EDITOR="code --wait"$ /editor// gotcha
Without --wait a GUI editor (code, cursor, zed) returns instantly and opencode submits an empty prompt. Terminal editors like nvim and vim do not need it.