Skip to content

Editor

The Editor (⌘6) is a full code editor — the same engine as Visual Studio Code — for the text of your ledger. Anything Beancount can express, you can write here.

The menu at the left of the toolbar shows the name of the file you are editing. Open it to see every file of the ledger — the main file first, then each included one, with its path relative to the ledger’s folder — and some marks:

Mark Meaning
Has unsaved changes.
[M] Modified since the last commit.
[?] New file, not yet in Git.
— 2 errors Beancount errors in that file.

Only files that are really part of the ledger are listed. A .beancount file that sits in the folder but is not included by anything is not shown.

The editor opens the last file you had open, and each file remembers its cursor, scroll position and undo history while the app is running, so you can switch back and forth freely.

Syntax highlighting for dates, directives, flags, accounts, amounts, currencies, strings, tags, links, metadata keys and comments, in light and dark mode. If your ledger renames the root accounts (option "name_assets" "Activo"), highlighting follows.

Autocomplete knows your ledger. It appears as you type, or on ⌃Space:

Where you are typing Suggestions
At the start of a line Today’s date.
Inside the first "…" of a transaction Your payees.
An indented line (a posting) Your accounts. Type : to continue into subaccounts.
After open, close, balance, pad, note, document Your accounts.
After a number Your currencies.
After # Your tags.
After ^ Your links.

Quotes, braces and parentheses close themselves, and ⌘/ comments or uncomments lines with ;.

Everything you expect from a code editor is there:

Action Shortcut
Find / Replace ⌘F / ⌥⌘F (also the magnifier button)
Go to line ⌃G
Indent / outdent ⌘] / ⌘[
Move line up / down ⌥↑ / ⌥↓
Copy line up / down ⇧⌥↑ / ⇧⌥↓
Add a cursor -click
Select next occurrence ⌘D
Command palette F1

Font size, line wrapping and the minimap are in Settings ▸ Editor.

Format File — the Format button, ⇧⌥F, File ▸ Format File, or the editor’s context menu — aligns the amounts of the file, exactly like Beancount’s bean-format.

  • It is a normal edit, not a save: you can undo it with ⌘Z, and the file stays unsaved until you save.
  • It only ever changes whitespace. The app verifies that, and refuses the result otherwise.
  • It aligns at the column the file already uses. Plain bean-format sizes the columns from the content, so one longer account name would shift every line of the file and produce an enormous diff. This does not.

With Format on save (on by default, in Settings ▸ Editor), ⌘S formats first. If formatting ever failed, the file is saved as it is.

Save⌘S or the ✓ button — writes the file, reloads the ledger, shows any errors and, by default, commits. All of it is explained in Saving and committing. Save All (⌥⌘S) saves every file with changes.

While a file has unsaved changes the window’s subtitle says Edited. Undoing back to the saved state makes it clean again.

After each save or reload, the lines Beancount complained about are underlined in red; hover for the message. The status bar shows the count for the file, and the file menu the count for each file. The complete list is in Errors.

An error does not stop you from saving. You are never locked out of fixing your own file.

Left Right
No errors or 2 errors for this file, and brief notices. The Git branch; how the file stands; the cursor’s line and column.

How the file stands against Git:

State Meaning
Unsaved Changes not yet written to disk.
Modified, not committed Saved, but different from the last commit.
New, not committed A file Git does not know yet.
Committed Identical to the last commit.
Conflicted Git is in the middle of a merge with conflicts in this file.

Reveal in Editor — from the Journal, from an error, from a lot in Portfolio — opens the right file with the cursor on the entry’s line.

The app watches your files. If one changes on disk:

  • and you have no unsaved changes to it, the editor simply shows the new content;
  • and you do, nothing is overwritten. A yellow bar appears: “2026.beancount” changed on disk while you were editing it, with two choices:
    • Reload from Disk — take the version on disk and discard your edits.
    • Keep Mine — keep your edits; the next save will overwrite the version on disk.

Saving also checks that the file on disk is still the one you started from, so a change made by another program is never overwritten by accident.