Skip to content

File Editor

devxian edited this page Nov 30, 2026 · 6 revisions

English | 한국어

File editor

Use an editor tab to open, edit and save one file. Code locations that an agent shows you also open in this tab.

cozzle picks the syntax highlighting language from the file extension.^app Highlighting covers Rust, TypeScript and TSX, JavaScript (.js, .jsx, .mjs, .cjs), JSON, HTML, CSS, Markdown, Python, Go, TOML, YAML and Bash (.sh, .zsh and similar).

Open a file

  • Click a file in the Files panel on the right.
  • Run cozzle open in a terminal, or let an agent run it.
cozzle open src/app.rs            # relative to this shell's working folder
cozzle open src/app.rs --line 120 # cursor on line 120
  • If the file is already open, cozzle switches to that tab instead of opening a new one.
  • The tab opens in the workspace that contains the file. If no workspace contains it, it opens in the current workspace.
  • Files over 2 MB and files that are not UTF-8 text (images, binaries) do not open. A notification gives the reason.^readme

Save

  • Press ⌘S (Ctrl+Shift+S outside macOS) to save.
  • A tab with unsaved changes has ● before its name.
  • If you close a tab with unsaved changes, cozzle stops the first attempt and shows a notification. Close it again to discard the changes.
  • Saving refreshes the change list in Source Control.

Language features

With a language server for the file's language, the editor shows completions, a card with the type and documentation when you hover over a name, and error and warning underlines. To go to a definition, hold ⌘ and click a name, press F12, or right-click it. ⌃Space opens completions. See Settings → Language servers for installing servers.^lsp

When a server needs you, a bar appears above the editor:

Bar Buttons
Trust this folder to turn on language features? Trust, Not Now. Servers can run project code, so they start only in folders you trust
<language> language server isn't installed Install (opens a terminal tab with the install command), or Settings when the install tool is missing; Not Now
<language> language server stopped, with the reason below Retry, Settings, Not Now
  • Nothing shows while a server starts or runs. Without a server, completions still offer keywords and words from open files.
  • A server that stops is started again after 2, 4, 8… seconds, up to three times; Retry starts it at once.
  • For TypeScript and JavaScript, cozzle starts typescript-language-server and, when that cannot start (TypeScript 7 has no tsserver for it), the tsc --lsp --stdio server of TypeScript 7.

Problems

  • Problems are underlined by severity: errors red, warnings yellow, information blue (wavy), hints with a thin gray line. A dot in the gutter marks each line with a problem.
  • The first line of the most severe problem shows dimmed after the end of its line. Turn it off with Settings → General → Editor → Show problems at the end of the line. On that line the commit note gives way to the problem.
  • The bottom right of the editor counts errors (✕) and warnings (⚠). Click it, or press F8, for the next problem; ⇧F8 goes back. Both wrap around.

Hover card

Rest the pointer on a name or an underline for about a third of a second. One card opens below the word (above it when there is no room below), never over the word:

  • Problems under the pointer come first: a severity dot, the message with its line breaks and code in a code style, the severity with the source and code (such as Error · rustc E0308), and Quick Fix (when the server offers fixes) and Copy.
  • Then the symbol: the signature in the code font with syntax colors, then its documentation, separated by thin lines. Long cards scroll.
  • Answers that say nothing more than the name show no card.
  • The card stays open while the pointer is on it, so you can select and scroll its text. It closes when the pointer leaves the editor and the card, or with Esc.
  • ⌘. (Ctrl+. outside macOS) opens the fixes at the cursor; choosing one changes this file in one undo step. Fixes that would edit other files are not listed.

Fix with Agent and Ask Agent

Two buttons hand code to Claude Code or Codex. Nothing is sent until you click.

  • Fix with Agent in a problem's hover card sends the problem (severity, message, source and code, line) and the 12 lines on each side.
  • Ask Agent (⇧⌘I, Ctrl+Shift+I outside macOS) opens a question field at the bottom of the editor for the selected lines, or the cursor line. Press Return or Send.

Where it goes:

  • If Claude Code or Codex runs in a terminal tab of this workspace, the request is typed into that session (the tab you are on first, then the most recent). The agent edits the file itself; its edits show up in the editor and in the AI Editing list. Show Tab switches to the session. With several sessions, the card lets you pick one.
  • Otherwise a one-off run of the agent chosen in Settings → General → Editor → Agent when none is running (Claude Code by default, or Codex, or Ask Each Time) answers in the card. The run can read files but cannot run commands or change files. A proposed change shows as a diff of the lines sent; Apply puts it in the editor as one undo step, Discard closes the card. If those lines changed meanwhile, Apply refuses and asks you to ask again.
  • When the run fails, the card says why in a few words: not installed, not signed in, usage limit, took too long (3 minutes), or could not answer with the agent's last message.

When something goes wrong

What happened What you see
The file changed on disk while the tab has unsaved changes A bar: This file changed on disk, with Reload from Disk (drops your changes) and Keep My Changes (saving later overwrites the disk)
Saving failed A bar: Couldn't save the file and the reason, with Retry and Details (the system's own message)
A file cannot be read A notification Couldn't open the file with the reason

Reasons are short: the file or its folder no longer exists, no permission for this file, the disk is full, the disk is read-only, a folder and not a file. Other errors show the system message in parentheses. Tabs without unsaved changes reload by themselves when the file changes on disk.

Commit info for the cursor line

In a Git repository, the line with the cursor shows a dim note after its end: the author, how long ago, and the commit summary, such as Jane Doe, 3 days ago • fix: keep scroll.^blame

  • Hover over the note for the short hash, the author, the date in the author's time zone and the full commit message.
  • Lines you added or changed and have not committed show Not committed yet. Unsaved edits count: lines below an edit keep their commit.
  • The note updates shortly after you stop typing and after a commit, checkout or reset in the repository.
  • Files outside a repository and files Git does not track show nothing.
  • Turn it off with Settings → General → Editor → Show commit info for the cursor line.

Good to know

  • Editor tabs cannot be duplicated.
  • Save your changes in the tab before you ask an agent to edit the same file. The guide that cozzle gives agents says the same.^agent-guide
  • After a restart, editor tabs reopen their files. Tabs whose file was deleted are not restored.

Clone this wiki locally