docs: document editor --wait flag (#2209)

Co-authored-by: rekram1-node <aidenpcline@gmail.com>
This commit is contained in:
OpeOginni
2025-08-23 21:43:20 +02:00
committed by GitHub
parent 07ed2a8391
commit b80046120c

View File

@@ -254,37 +254,52 @@ Both the `/editor` and `/export` commands use the editor specified in your `EDIT
<Tabs> <Tabs>
<TabItem label="Linux/macOS"> <TabItem label="Linux/macOS">
```bash ```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; To make it permanent, add this to your shell profile;
`~/.bashrc`, `~/.zshrc`, etc. `~/.bashrc`, `~/.zshrc`, etc.
</TabItem> </TabItem>
<TabItem label="Windows (CMD)"> <TabItem label="Windows (CMD)">
```bash ```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 To make it permanent, use **System Properties** > **Environment
Variables**. Variables**.
</TabItem> </TabItem>
<TabItem label="Windows (PowerShell)"> <TabItem label="Windows (PowerShell)">
```bash ```powershell
$env:EDITOR = "notepad" # or "code", "vim", etc. $env:EDITOR = "notepad"
# 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 To make it permanent, add this to your PowerShell profile.
profile.
</TabItem> </TabItem>
</Tabs> </Tabs>
Popular editor options include: Popular editor options include:
- `code` - Visual Studio Code - `code` - Visual Studio Code
- `cursor` - Cursor
- `windsurf` - Windsurf
- `vim` - Vim editor - `vim` - Vim editor
- `nano` - Nano editor - `nano` - Nano editor
- `notepad` - Windows Notepad - `notepad` - Windows Notepad
- `subl` - Sublime Text - `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.
:::