Changing workspace
Development reference · View source
:cd DIRECTORY finds the workspace DIRECTORY belongs to, the same way a launch
does, and acts on the answer in ide and mux alike:
| DIRECTORY’s workspace | ide | mux |
|---|---|---|
| The one already open | The working directory moves | The same |
| A different one | Runyte restarts there, on an explorer of DIRECTORY | Attaches to its session, starting it if needed; the session you left keeps running |
| None | The working directory moves, and nothing is created | The same |
- A bare
:cduses the directory the active explorer or terminal shows. - The explorer’s
Tab cgoes where:cdwould. Where there is no workspace it also makes one, refusing the directories listed above . :init [DIRECTORY]makes exactly that directory a workspace, even inside a repository, and moves there, asrunyte --initfollowed by a launch would. It defaults to the active explorer or terminal, then the working directory.- A workspace made inside a repository stays open while you move around in it.
- In ide, leaving a workspace ends the editor’s panes, selections and undo history. It refuses while there are unsaved changes, plugin work still running, or terminals with a live program, an idle shell included. It also refuses a workspace Runyte could not open, and when the Runyte program has been removed since it started. A refused move changes nothing, and moving inside the workspace is never refused.
- On Windows, a mux
:cdattaches to the workspace without moving that session’s working directory.
Editor mode has no workspace, so there :cd only changes the working
directory.