# Edit a workspace

Source: https://libtmux.org/en/py/stable/workspace/cli/edit/

> Resolve a workspace file or saved name and open it in an editor.

Resolve a saved workspace or file and open it in the configured editor.

## Open a workspace

With [`workspace.yaml`](https://libtmux.org/en/py/stable/workspace/guides/installation/#create-the-input) saved and `vi` installed:

```console
$ EDITOR=vi tmuxp edit workspace.yaml
```

The command passes the entire `EDITOR` value as one executable name followed by
the file path. It does not split editor arguments. Use a wrapper executable when
arguments are needed.

The command waits for the editor but does not propagate its exit status. Inspect
the edited file before loading it. [Discovery](https://libtmux.org/en/py/stable/workspace/guides/discovery/) explains
saved workspace names.

[Command source](https://github.com/tmux-python/tmuxp/blob/618b398acc05506d3c682906c36cdeb29dcfa1ff/src/tmuxp/cli/edit.py).
