Skip to content

The Code Window

The Code window is where you read and edit your project’s files, run commands in a Terminal, and watch the dev server’s logs. It opens in its own window next to the editor.

Click Code in the footer, or press ⌘3. You can also press ⌘K and choose Open code editor window (see The Command Palette).

The Files sidebar on the left lists your project’s folders and files. Click a file to open it in a tab. Press ⌘B to hide or show the sidebar. Unsaved tabs ask before they close; ⌘S saves the current file and ⌘⇧S saves them all.

Where is the Terminal, and where are the logs?

Section titled “Where is the Terminal, and where are the logs?”

At the bottom of the Code window is a collapsible strip with two tabs: Terminal and Logs.

  • Terminal is a shell that starts in your project’s folder. Open the terminal to run commands, such as installing a package. You can also open the terminal from the palette: press ⌘P, type >, and choose Open Terminal.
  • Logs shows what the dev server prints: build output and errors. Look here when the preview looks wrong or does not load.

To jump straight to them from the editor, click Logs at the bottom left of the main window. It opens the Code window with the Logs tab showing. The Collapse panel and Expand panel button at the right of the strip hides or shows it.

The first time you run a project’s own code, Plyed asks you to trust the project.

The dev server powers the live preview. In the Code window, use the Start dev server / Stop dev server button in the bottom strip. In the main window you can also use Start dev / Stop dev in the top bar. Restart it after changing environment variables.

Press ⌘P in the Code window and type part of a file name; press Enter to open it. Press ⌘⇧P to create a new file: type a path such as src/components/Hero.astro. Start with > to run a command instead, such as Open Terminal, Open Logs or Stop Preview.

In the main window, ⌘P means something else: it acts on the selected element (see Adding Elements).