User guide / Workspaces and persistent sessions

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 workspaceidemux
The one already openThe working directory movesThe same
A different oneRunyte restarts there, on an explorer of DIRECTORYAttaches to its session, starting it if needed; the session you left keeps running
NoneThe working directory moves, and nothing is createdThe same
  • A bare :cd uses the directory the active explorer or terminal shows.
  • The explorer’s Tab c goes where :cd would. 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, as runyte --init followed 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 :cd attaches to the workspace without moving that session’s working directory.

Editor mode has no workspace, so there :cd only changes the working directory.