Liu Terminal Code Editor: a tab with an explorer rail, syntax highlighting for more than 50 languages, find and replace, and a status bar with position, language, line ending and encoding.
The Code Editor turns a tab into a small IDE next to your agents, so you can read and fix the files they touch without switching apps.
In a tab, the file list docks as a narrow explorer rail on the left and the document fills the rest. Every row and the tab itself carry a file-type icon. Long lines scroll sideways, and the view follows the caret.
One table-driven highlighter covers more than 50 languages and recognizes files by over 400 extensions and names, such as Makefile, Dockerfile and go.mod. The editor, the git diff dock and fenced code blocks in the Markdown reader all use it, so a file and a code block in the same language look the same.
Click to place the caret, double-click to select a word and triple-click to select a line. Shift-click extends the selection, and dragging selects; drag past the edge to scroll. Shift with any motion key below extends the selection too.
| Shortcut | Action |
|---|---|
| ⌘ S | Save |
| ⌘ Z / ⌘ ⇧ Z | Undo / redo |
| ⌘ A | Select all |
| ⌘ C / ⌘ X | Copy / cut the selection, or the whole line when nothing is selected |
| ⌘ V | Paste, replacing the selection |
| ⌘ D | Duplicate the line |
| ⌘ / | Comment or uncomment the lines |
| ⌘ ] / ⌘ [ | Indent / outdent the lines |
| Tab / ⇧ Tab | Indent the selected lines or insert four spaces / outdent |
| ⌘ Enter / ⌘ ⇧ Enter | New line below / above |
| ⌥ ↑ / ⌥ ↓ | Move the lines up / down |
| ⌘ ← / ⌘ → | Start / end of the line |
| ⌘ ↑ / ⌘ ↓ | Start / end of the document |
| ⌥ ← / ⌥ → | Move by word |
| ⌘ ⌫ | Delete to the start of the line |
| ⌥ ⌫ / ⌥ ⌦ | Delete the word before / after the caret |
| ⌃ K | Delete to the end of the line |
| Page Up / Page Down | Move one screen up / down |
The usual macOS text keys work too: ⌃ A and ⌃ E go to the start and end of the line, ⌃ F, ⌃ B, ⌃ P and ⌃ N move the caret, and ⌃ D and ⌃ H delete.
The find bar searches as you type, highlights every match and counts them. Matching ignores case. While the bar is open, its keys come before the editor's.
| Shortcut | Action |
|---|---|
| ⌘ F | Open Find |
| ⌘ ⇧ F / ⌘ ⌥ F | Open Find and Replace |
| Enter / ⌘ G | Next match |
| ⇧ Enter / ⌘ ⇧ G | Previous match |
| Tab | Switch between the Find and Replace fields |
| Enter | In the Replace field: replace this match and go to the next |
| ⌘ Enter | Replace all |
| ⌘ V | Paste into the field, not the document |
| Esc | Close the bar; the caret stays on the current match |
The bar under the document shows the caret position on the left (Ln 42, Col 17) and the language, line ending and encoding on the right, for example TypeScript · LF · UTF-8. An extension Liu does not know is shown in capitals, and a file with no extension reads Text.
The line ending is the one the file was read with, LF or CRLF, and Enter keeps writing it.
With the status bar on (⌘ K → Toggle Status Bar), a terminal tab inside a git repository shows its branch and the added and removed line counts. Click that segment to dock the working tree's diff on the right, highlighted by the same rules as the editor. ⌘ K → Toggle Git Changes hides or shows the segment.
Markdown files open in the Markdown reader, where Edit mode uses the same keys and adds Markdown formatting.
Türkçe · 简体中文 · 한국어 · Español · Deutsch · Italiano · Français · 日本語 · العربية