Tabs and projects
The sidebar is one tree. A project can contain tabs and other projects. A tab is always in a project. A tab and a project have the same kinds of action, each with the name of its kind.
The actions
| To do this | On a tab | On a project |
|---|---|---|
| Change the name | Rename Tab (⌘R) | Rename Project |
| Move it among the rows next to it | Move Tab Up (⌃⇧[), Move Tab Down (⌃⇧]) | Move Project Up, Move Project Down |
| Move it into another project | Move Tab to Project | Move Project into Project |
| Move it one level up | (no action: a tab is always in a project) | Move Out of Project |
| End it | Close Tab | Remove Project |
All of these actions are in the command palette (⌘P). The right-click menu of a sidebar row has the actions for that row.
The menu bar has some of them:
- The Project menu has Rename Project…, Move Tab to Project, Move Project into Project, Move Out of Project and Remove Project.
- The File menu has Close Tab and Remove Project.
- Rename Tab, Move Tab Up and Move Tab Down are in no menu of the menu bar.
Only the three keys in the table have a default. ⌘W closes the pane, not the tab. To set a key for an action, go to Settings → Keymaps.
Each palette row shows the tab or project that it changes. A project shows as its path (see Project names). A search for an old title, such as Rename Current Tab, still finds the row.
Project names
A project name cannot contain >. It can contain a slash. Pinned, Scratch Tabs and scratch are reserved names, in uppercase or lowercase. Macterm refuses a name that you type with one of these problems.
When Macterm shows a project as text, it shows the path of names from the top level, with › between the names: Work › api. The palette rows, the project screen, the Project Insights header, the Remove Project question and the quit list show this path. A palette row of a nested project shows its name, and the path of its parent under the name. The sidebar and Settings → Projects show the name only, because the tree shows the parents.
To type a path in the palette or in the CLI, use >. Work>api and Work > api are the same path. A palette search finds Work › api from work>api, work api or workapi. The CLI prints the path with >.
When you add a folder and do not type a name, the project gets the name of the folder. Macterm changes each > in that name to -. A folder with a reserved name, such as Pinned, gets 2 after the name: Pinned 2. When Macterm starts, it changes each > in a name from an older version to -.
What an action acts on
An action acts on its target. Macterm finds the target in this order:
- The selected rows of the sidebar, when more than one row is selected and the sidebar shows. To select more rows, hold ⌘ or ⇧ and click.
- The tab that the window shows.
- The project of the project screen.
When you press a key or click in a pane, Macterm selects only the row of the shown tab again. The palette records the target when it opens. Thus the palette acts on the rows that you selected before you opened it.
In the palette, a tab has the actions of its project too. When the target is one tab, the palette shows the tab actions and the project actions. The project actions act on the project of the tab. For example, when the window shows a tab of api, Rename Project renames api. When the target is a project, the palette shows only the project actions. A tab of Pinned or Scratch Tabs has no project actions.
Move Out of Project acts on the project that the window shows. It moves the project into the parent of its parent, after its old parent. A project that is one level down goes to the top level. The action shows only for a project that is inside another project.
Moving into another project
Move Tab to Project and Move Project into Project open a list of projects in the palette. Each project shows its path of names, with › between the names (Work › api). Type a name or a path to filter the list. Select a project and press ↩.
- The list does not show the project that the row is in now.
- The list shows only projects of the sidebar tree. Pinned and Scratch Tabs are never in it. To move a tab there, use Pin Tab, or Move to Scratch Tabs in the right-click menu of the tab.
- A project cannot go into itself or into a project inside it.
- The row goes to the end of the project: a tab after the tabs, a project after the projects. The project and the projects above it open in the sidebar.
- After a tab moves, the window shows the project that the tab moved to.
You can also drag a row to a new place in the sidebar.
A set of rows
When the target is more than one row, the title of an action says the count: Close 2 Tabs, Remove 2 Projects, Move 2 Tabs Up, Move 2 Projects into Project.
- Move Up and Move Down move the tabs of one project, or the projects of one parent, together. If one of the rows is at the end already, the palette does not show the action.
- The list of a move to a project shows only the projects that all of the rows can go to. If there is no such project, the palette does not show the action.
- A tab or a project that is inside a selected project moves with that project. The count in the title does not include it.
- A set has no Rename and no action for one row only, such as Pin Tab or Separate All Panes.
- A set of tabs and projects has only two actions. Move 3 Items to Project is in the palette and in the right-click menu. Remove 3 Items is only in the right-click menu of the sidebar.
Close Tab and Remove Project
- A tab closes at once. If a program runs in it, Macterm asks first.
- A project that has no tabs and no projects inside it goes at once. For other projects, Macterm asks first. The question gives the number of tabs and nested projects that go.
- A set goes at once when it has no tabs in its projects, no nested projects and no running programs. For other sets, Macterm asks one question. The title gives the number of selected rows. The message gives the number of tabs and nested projects that go. Macterm counts each tab and project only one time.
- A pinned tab only closes. Its row and its saved layout stay. See pinned tabs.
Remove Project ends the sessions of the project and of the projects inside it. It does not change your files.
From the CLI
The macterm CLI has the same verbs for tabs and projects. See the CLI.