---
title: When editing is off
slug: document-lock
summary: Skimmark only lets you edit text it can save without changing any other line. It checks every file when it opens and again on every update, and turns editing off for the parts, or the whole file, it cannot save safely.
---

# When editing is off

AI agents and other tools read your files byte for byte. Skimmark makes sure that saving a file never changes a line you did not edit. Each time a file opens, and again each time it changes on disk, Skimmark runs a quick check before you can edit that version. See Editing and saving a file for editing itself.

## Parts of a file

Skimmark tries to write every block of the file (a paragraph, a heading, a list item, a table, a code block) back exactly as it is on disk. A block it cannot write back exactly becomes **read-only**. You can still read it, select it, and copy it. The rest of the file stays editable, and saving never touches the read-only block.

Today these blocks are often read-only:

- **Tables** written without padding, such as `|---|---|` delimiter rows. Skimmark would pad the columns.
- **Text with `~`, `_`, `[`, `&`, `*`, or `<`** that Skimmark would write with an extra backslash.
- **Lists that use `*` or `+` bullets.** Skimmark writes bullets as `-` and horizontal rules as `---`, the way most AI agents write them.
- **Indented code** (code shown by four leading spaces instead of a ``` fence).
- **A part Skimmark could not format**, shown in a dashed box under **Could not render this part**. See [Reading a file](reading.md).

Later updates will shrink this list, starting with tables. Put the cursor in a read-only block and the status strip says which block it is and why, for example **This table is read-only: the app can't save it without changing other lines.**

## The whole file

Editing is off for the whole file when:

- the file is not valid UTF-8 text (Skimmark also says "This file is not valid UTF-8"), or
- Skimmark cannot read the file's structure, or cannot match the formatted page to the file's text. The file still shows, read-only.

The status strip then says **Editing is off for this file: the app can't save it without changing other lines.**

A very long file (over 100,000 characters) is not checked, so that opening or updating it never slows Skimmark down. Editing is off for the whole file, and the status strip says **Editing is off for this file: it is too large to check before editing.** Reading, [live updates](live-updates.md), and [Changes](changes-view.md) still work. When the file changes on disk and the new version passes the check, the message goes away by itself.

## Math

Skimmark shows standard Markdown, which has no math. Text such as `$$x^2$$` shows exactly as typed. See [Reading a file](reading.md).
