VCode home

Edit a file

Agents: claude, codex, opencode · On: phone, desktop · beta

Tap Edit in the viewer, change the text, and save it to disk. A save never overwrites what the agent wrote in the meantime without asking you first.

Why you would use it

The agent got one word wrong in a config file, or you want to fix a typo before you ask for the next change. Typing the fix is quicker than describing it, and you do not need a terminal or a laptop to do it.

How to use it

  1. Open a text file in the viewer. It opens in read mode.

  2. Tap the pencil in the viewer head (#viewer-edit, "Edit"). The body becomes an editor with line numbers, and the pencil turns into a green tick ("Done"). On a phone the keyboard stays down until you tap the line you want to change.

    A JavaScript file in edit mode: the green tick and the save button in the head, a dot after the path for unsaved edits, and the edited line under the cursor

  3. Change the text. A dot appears after the path while there are unsaved edits.

  4. Tap the save button (#viewer-save, "Save (Ctrl+S)"), or press Ctrl+S (Cmd+S on a Mac). The toast reads saved.

  5. Tap the tick to go back to read mode. With unsaved edits, the tick saves them first; tapped while a save is on its way, it waits for that save. Either way it leaves edit mode once the save lands with nothing left unsaved, and stays in edit mode if the save does not land, with the toast or the strip saying why.

  6. If the file changed on disk since you opened it, the save stops and a strip under the head reads changed on disk (#viewer-conflict):

    • Compare (#viewer-compare) shows your text against the disk, changed lines marked. The button then reads Back; tap it to return. Your edits stay as they are.
    • Reload (#viewer-reload) drops your edits and takes the disk's text. You stay in edit mode.
    • Overwrite (#viewer-overwrite) saves your text over the disk's.

    The conflict strip under the viewer head: changed on disk, then Compare, Reload and a red Overwrite

  7. If the file was deleted on disk, the strip reads deleted on disk. A save finds it, and so does the disk check while you have no unsaved edits. In read mode the strip only says so, and it goes when the file is back. In edit mode:

    • Save as new (#viewer-save-new) makes the file again and saves your text into it.
    • Discard (#viewer-discard) drops your edits and closes the viewer.
  8. To throw your edits away, tap close (#viewer-close) twice. The first tap turns it red and the toast reads unsaved edits: tap × again to discard them. It disarms after three seconds. A second tap within 0.3 seconds of the first, as in a double tap, does not count.

What you see

Options and settings

Option Default What it changes
Size limit 1 MiB The largest file that opens for editing, and the largest save the server accepts
Disk check every 3 s How often an open, clean file is read again
Draft delay 500 ms How long after the last keystroke the draft is written

Limits and known gaps