summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOpeOginni <[email protected]>2025-08-23 21:43:20 +0200
committerGitHub <[email protected]>2025-08-23 14:43:20 -0500
commitb80046120c9674d3c717dd426997606feeb52eb2 (patch)
treeb098ac905f6f541ae0174639b94733a81165ba75
parent07ed2a8391c2aa6ed6fdb2e4eb9f82683d5b95fe (diff)
downloadopencode-b80046120c9674d3c717dd426997606feeb52eb2.tar.gz
opencode-b80046120c9674d3c717dd426997606feeb52eb2.zip
docs: document editor --wait flag (#2209)
Co-authored-by: rekram1-node <[email protected]>
-rw-r--r--packages/web/src/content/docs/docs/tui.mdx33
1 files changed, 24 insertions, 9 deletions
diff --git a/packages/web/src/content/docs/docs/tui.mdx b/packages/web/src/content/docs/docs/tui.mdx
index e6ad10162..a886cd312 100644
--- a/packages/web/src/content/docs/docs/tui.mdx
+++ b/packages/web/src/content/docs/docs/tui.mdx
@@ -254,37 +254,52 @@ Both the `/editor` and `/export` commands use the editor specified in your `EDIT
<Tabs>
<TabItem label="Linux/macOS">
```bash
- export EDITOR=nano # or vim, code, etc.
+ # Example for nano or vim
+ export EDITOR=nano
+ export EDITOR=vim
+
+ # For GUI editors (VS Code, Cursor, VSCodium, Windsurf, Zed, etc.) include --wait
+ export EDITOR="code --wait"
```
To make it permanent, add this to your shell profile;
`~/.bashrc`, `~/.zshrc`, etc.
-
</TabItem>
+
<TabItem label="Windows (CMD)">
```bash
- set EDITOR=notepad # or code, vim, etc.
+ set EDITOR=notepad
+
+ # For GUI editors (VS Code, Cursor, VSCodium, Windsurf, Zed, etc.) include --wait
+ set EDITOR=code --wait
```
To make it permanent, use **System Properties** > **Environment
Variables**.
-
</TabItem>
+
<TabItem label="Windows (PowerShell)">
- ```bash
- $env:EDITOR = "notepad" # or "code", "vim", etc.
- ```
+ ```powershell
+ $env:EDITOR = "notepad"
- To make it permanent, add this to your PowerShell
- profile.
+ # For GUI editors (VS Code, Cursor, VSCodium, Windsurf, Zed, etc.) include --wait
+ $env:EDITOR = "code --wait"
+ ```
+ To make it permanent, add this to your PowerShell profile.
</TabItem>
</Tabs>
Popular editor options include:
- `code` - Visual Studio Code
+- `cursor` - Cursor
+- `windsurf` - Windsurf
- `vim` - Vim editor
- `nano` - Nano editor
- `notepad` - Windows Notepad
- `subl` - Sublime Text
+
+:::tip
+Some editors need command-line arguments to run in blocking mode. The --wait flag makes the editor process block until closed, which is necessary for opencode to function correctly.
+:::