Editor And Files

The editor is a project workspace, not a single-file sketch window. It is built around a file explorer, tabs, a code editor, bottom tools, and the agent panel.

Main layout

When a project is open, the workspace has three main areas:

  • left panel: file explorer,
  • center panel: code, markdown, schematic, board, settings, and diff tabs,
  • right panel: Embedr Agent,
  • bottom panel: Serial Monitor, Output, and Terminal.

The panels are resizable. The bottom panel can be closed, partially open, or maximized.

File Explorer

The file explorer reads the project folder from disk. It is not a virtual tree.

Use it to:

  • search files by name,
  • create files and folders,
  • refresh the tree,
  • collapse folders,
  • rename,
  • delete,
  • copy, cut, and paste,
  • reveal files in the operating system file manager.

The tree ignores .git because that folder is internal Git state. Build output and other heavy background folders are also ignored by indexing and watchers where appropriate.

Opening files

Click a supported file to open it in a tab. Embedr supports firmware source files, common config files, markdown, images, and .zen hardware source files.

Markdown files can be edited as source or shown in preview. Image files are previewed directly. Diff tabs can be opened by version control and agent workflows.

Saving

Edited tabs become dirty until saved. When you navigate back to Home, Embedr checks for unsaved changes and offers to save before leaving.

If files change outside the app, the file watcher refreshes the tree and can refresh open files. This is useful when a terminal command, Git operation, or external editor changes the project.

Special Embedr tabs

Some tabs are not normal files. They use embedr:// internal paths:

Tab Purpose
embedr://settings Project and editor settings.
embedr://schematics Schematic source and preview workflow.
embedr://board Board layout view when PCB layout exists.

These tabs still belong to the project workspace, but they are app surfaces instead of files on disk.

Markdown preview

For .md files, use the preview toggle in the editor header. Markdown is useful for:

  • project notes,
  • wiring instructions,
  • datasheet extraction output,
  • build notes,
  • lab worksheets,
  • AI-generated summaries you want to review.

The preview is not a replacement for version control. Treat generated documentation like code: review it before committing.

Add selection to chat

You can select text in the editor, Output, Serial Monitor, or Terminal and add it to chat. This is one of the most reliable ways to give the agent exact context.

Use it for:

  • compiler errors,
  • serial logs,
  • suspicious code blocks,
  • command output,
  • small excerpts from datasheets.

Keep selections tight. A 20-line error is usually better than a 900-line log.

Keyboard habits

Use the editor like a source control workspace:

  • save often before compiling,
  • keep generated output out of source folders,
  • open the smallest relevant file when asking the agent for a change,
  • use search before assuming the project has only one implementation of a behavior.

Teaching note

For students, the file tree is the first map of the project. Have them identify:

  1. the manifest,
  2. the main source file,
  3. the build config,
  4. any local libraries,
  5. generated folders they should not edit.

That exercise prevents a lot of "where did my code go?" confusion later.