anomalyco / anomalyco/opencode
[FEATURE]: Allow users to customize how project files are opened from the TUI (e.g. Typora, VS Code, Notepad++)
@kommander is already working on this.
Since Sep 12, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Feature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Description
Related
Problem
The OpenCode TUI currently supports opening an external editor for composing messages via Ctrl+E or the /editor command. However, this is limited to message editing and uses a single editor defined by the EDITOR environment variable. There is no general way to open a project file from the TUI in an external editor.
In real workflows, developers often need to open project files while working inside the TUI. For example:
- Opening Markdown files in Typora for visual editing and preview.
- Opening code files in VS Code or Cursor for deeper changes.
- Opening configuration files in Notepad++ or another lightweight editor.
Today, users must leave the TUI, switch to an external editor, navigate to the file path, and open the file manually. This breaks the flow of working inside the terminal.
The current mechanism also has limitations:
EDITORcan only define one editor, so users cannot choose different editors for different file types.- The existing editor integration only applies to message composition, not project files.
- There is no context menu or shortcut for opening a file from the TUI in an external editor.
This is related to #30135, which asks to re-add the “Open in external editor” option from the old TUI and suggests making it a configurable editor list, such as “Open in VS Code” or “Open in Notepad++”.
Proposed enhancement
Add a general “Open in external editor” action to the TUI, with support for user-defined editors.
-
Action entry point: Add an “Open in external editor” option in the file list, session file changes,
@file picker, or file preview. It could be triggered from a right-click context menu or a keyboard shortcut such asCtrl+Shift+E. -
User-defined editor configuration: Allow users to configure multiple external editors in
opencode.jsonortui.json. Each editor should have a display name and a launch command. For example:{ "externalEditors": [ { "name": "Typora", "command": "typora" }, { "name": "VS Code", "command": "code" }, { "name": "Notepad++", "command": "notepad++" } ] }When multiple editors are configured, selecting “Open in external editor” should show a picker listing all configured editors.
-
Smart default behavior: If only one editor is configured, open the file directly with it. If no editor is configured, fall back to the editor defined by
EDITOR. -
Optional file type associations: Support mapping file extensions to default editors, such as
.mdto Typora and.tsto VS Code, similar to operating system file associations.
Why this matters
Developers working in terminal-based environments depend on the TUI for a continuous workflow. The value of the TUI is that users can chat with the model, browse files, and modify code in one interface. However, the lack of a direct way to open project files in an external editor forces users to switch windows repeatedly between the terminal and their editor.
Allowing users to customize external editors makes this workflow practical. Typora can handle Markdown documents, VS Code can handle source code, and Notepad++ can handle quick edits. This enhancement not only restores functionality that existed before the TUI rewrite, as referenced in #30135, but also makes it more flexible through user configuration.
Alternatives
- Continue using only
EDITORand manually changing it when a different editor is needed. - Leave the TUI and run shell commands to open files in external editors.
- Rely on OS-level file associations outside the TUI.
Activity
No response.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.