# Text Editor: text and code editor for SodiumOS

> Text Editor opens any text file with tabs, syntax highlighting and find and replace, and saves it back in its own encoding and line endings.

Open any text file. Save it back exactly as it was.

## What Text Editor does.
- **Tabs you can tear off:** Tabs sit in the title bar. Drag one out to make a window, or onto another window to move it. Open tabs come back at the next launch with their cursor and scroll position.
- **Respects the file:** UTF-8, UTF-16, GB18030, Big5, Shift_JIS and Latin-1 are detected and written back unchanged, along with the file's own line endings and byte-order mark.
- **Never overwrites a change it has not seen:** Saves are atomic. If the file changed on disk, a banner offers Reload or Keep Mine before anything is written.
- **Handles big files:** Syntax colors up to 5 MB, a question before opening 20 MB, and files over 50 MB open in Preview.

## Text Editor in detail.
- Syntax highlighting with a language picker, and a line-number gutter
- Status strip with line and column, encoding, line ending and indentation
- Find and replace with match case, whole word and regular expressions
- Go to line with `Ctrl+G`; word wrap with `Alt+Z`; zoom
- Format JSON, as one undoable step
- `texteditor FILE:LINE:COL` opens a file at a position from the terminal
- Binary files show a choice, not a screen of symbols
- Save to Notes copies the text into a note or adds a link card to the file

---
Source: https://sodiumos.com/apps/text-editor/ · Part of [SodiumOS](https://sodiumos.com/index.md), a modern Linux desktop. Index for agents: https://sodiumos.com/llms.txt
