mirror of
https://github.com/zed-industries/zed.git
synced 2026-11-19 06:59:22 +01:00
docs: Document default open behavior setting (#64610)
# Objective Update https://zed.dev/docs to include documentation for the `default_open_behavior` setting, introduced by #58805, just like we do for `cli_default_open_behavior`. This was discovered while I was revisiting https://github.com/zed-industries/zed/discussions/44355 . ## Solution Update the documentation for the `Windows & Projects > Opening in a New Window > Via Settings` section. ## Testing Used `mdbook serve docs` to build the documentation and review the edits. ## Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable ## Showcase <details> <summary>Before</summary> <img width="3792" height="2458" alt="CleanShot 2026-09-22 at 16 27 41@2x" src="https://github.com/user-attachments/assets/6722aa35-dc9a-4414-9338-bd08182af71b" /> </details> <details> <summary>After</summary> <img width="3792" height="2458" alt="CleanShot 2026-09-22 at 16 27 03@2x" src="https://github.com/user-attachments/assets/ec8ceb77-a2a9-495f-b145-85f5b8efddde" /> </details> --- Release Notes: - N/A
This commit is contained in:
@@ -62,20 +62,23 @@ See [CLI Reference](./reference/cli.md) for full details.
|
||||
|
||||
### Via Settings
|
||||
|
||||
You can change the default CLI behavior with the `cli_default_open_behavior` setting:
|
||||
You can change the default behavior by setting `cli_default_open_behavior`, which controls CLI opens, and `default_open_behavior`, which controls UI project opens and external open requests, such as macOS Finder's `Open With > Zed`.
|
||||
|
||||
To use separate windows, open the Settings Editor and search for `CLI Default Open Behavior` or `Default Open Behavior`, setting either or both to `new_window`. Or add this to your settings.json:
|
||||
|
||||
```json [settings]
|
||||
{
|
||||
"default_open_behavior": "new_window",
|
||||
"cli_default_open_behavior": "new_window"
|
||||
}
|
||||
```
|
||||
|
||||
Options:
|
||||
Both settings accept the same values:
|
||||
|
||||
- `existing_window` (default): Open folders in the current window's threads sidebar
|
||||
- `new_window`: Open folders in a new window
|
||||
- `existing_window` (default): Open folders in the current window's threads sidebar. Files outside any open project can also open in an existing window.
|
||||
- `new_window`: Prefer a new window. For external or CLI file opens, a non-ignored file inside an already-open project opens in that project's window while an unrelated file opens in a new window.
|
||||
|
||||
This setting affects CLI and double-click behavior, not the File > Open menu.
|
||||
It's worth noting that explicit flags provided to the CLI will override the CLI setting. In particular, `-n` forces a new window even when a path matches an open project. See [CLI Reference](./reference/cli.md) for the available flags.
|
||||
|
||||
## Adding Folders to a Project
|
||||
|
||||
|
||||
Reference in New Issue
Block a user