Make a document read-only in CotEditor on Mac

In CotEditor, you can make a document read-only so it can’t be edited, or lock it so it can’t be edited or deleted.

If you own a read-only or locked document, you can edit it after removing its read-only state or unlocking it.

Prevent a document from being edited

CotEditor can temporarily prevent a document from being edited to avoid unintended data modifications while reading. This state is only valid while the document is open in CotEditor and is not saved to the file.

You can also customize the toolbar and add the Edit toolbar item to quickly switch between preventing and allowing editing.

When a document is prevented from being edited, a read-only icon (pencil with slash) appears on the status bar.

Lock a document

The lock is the feature in macOS to protect documents from being accidentally changed or deleted. This state is saved in the file and persists when working with the document from other apps on Mac.

Tip: You can also lock or unlock a document from the Finder. For details about the Lock feature on Mac, see Lock a document on Mac.