Open in TheBrain

Markdown File Windows

Overview

In the desktop app, on Mac, Windows and Linux, TheBrain can open a Markdown file that lives anywhere on your computer — a README, a document you also edit in Obsidian or VS Code, notes you keep in a folder — and edit it in the same editor your notes use. The file opens in a window of its own and stays an ordinary file: it isn't added to a brain, and saving writes it back where it is. The web app and phones and tablets don't open files from your computer this way.

A Markdown file window doesn't need a brain or an account. It works in guest mode and while no one is signed in, and it stays open when you sign out.

How to Open a Markdown File

Do any of the following:

  1. Choose Main Menu > File > Open File... and pick a .md or .markdown file. It opens one file at a time. On a Mac, Open File... is also in the menu bar's File menu.
  2. Choose Main Menu > File > Open Recent and pick a file you opened before. The submenu shows once you have opened a file, and Clear Menu at its bottom empties it. On a Mac, Open Recent is also in the menu bar's File menu.
  3. Choose Main Menu > File > New Markdown File to start an empty, untitled document.
  4. Drag one or more Markdown files from your file manager and drop them on a brain window's title bar, on a content window's top row, or anywhere on a Markdown file window. Each file opens in a window of its own. A drop elsewhere in a brain window, or one that includes other kinds of files, does what it always did, such as attaching the files to a thought.
  5. In your file manager, open the file with TheBrain using Open With. On a Mac you can also drop the file on TheBrain's icon in the Dock. To have TheBrain open Markdown files when you double-click them, use Set TheBrain as the default app for Markdown files (see Markdown Files Settings).
  6. In a Markdown file window, click a link to another Markdown file (see Links).

If the file is already open in a window, that window comes to the front. When you open a file from your file manager while TheBrain isn't running, TheBrain starts without a brain window: it shows the file, along with the content windows and Markdown file windows you had open when you last quit. Files you open are added to your computer's list of recent documents, which a Mac shows in the Dock menu and Windows in the taskbar's jump list.

The Window

The top row of the window shows:

A Markdown file, Launch Checklist.md, open in a window of its own on the desktop app. Its top row has the window buttons, the Main Menu button, Back and Forward, the file's icon and name, and labels point at the name of its folder, Northstar Launch, and at the Keep above other windows pin. Below are the notes toolbar, the file shown formatted with headings, a checklist and a table, and the status bar with Rich Text, Text and Split

Below the top row is the notes editor, with its toolbar and status bar. The window always opens in Rich Text. Switch to Text (the document's Markdown) or Split (both side by side) with the status bar's view buttons or Main Menu > View.

Text and Split show the document as TheBrain will write it when you save, not the file's original text. For example, a list the file wrote with * already shows its bullets as - (see What Saving Does to a File in Markdown Files Settings). The file's properties at the top (frontmatter) don't show in any view; they are kept as they were when you save.

The Main Menu

On a Mac, while a Markdown file window is in front, the menu bar's File menu has New Markdown File, Open File..., Open Recent, Save, Save As..., Revert to Saved and Rename..., and the Window menu lists each file window by its file and folder name. In a file window, Ctrl+T (⌘T on Mac) is Go to Heading....

The File Menu

Click the file's name for these commands:

A new document that hasn't been saved yet offers only Save and Save As....

The top row of the window for Launch Checklist.md, with the menu that clicking the file's name opens: Saved on 10/17/2026 at 12:12 PM at the top, then Save (unavailable, since nothing has changed), Save As..., Rename..., Show in Finder, Copy Path and Move to Trash...

Dragging the File

The document icon beside the file's name stands for the file itself. Drag it anywhere you could drop the file from your file manager:

In a brain, the file is copied in unless you've changed On File/Folder Drop in Settings > User > General, and you can hold a modifier key as you drop to link to it or move it instead (see Dragging Files and Links In in Adding Attachments). A linked file stays where it is, so the thought's attachment and the window show the same file. A file you move into the brain leaves its folder, so the window then shows it as deleted.

What you drag is the file as it was last saved, so save first if you want your latest changes to go with it. A new document can't be dragged until you save it, and neither can a file that has been deleted.

Images

Other kinds of files dropped on a Markdown file window aren't added to it.

Links

When the file has unsaved changes, following a link to another file or a thought, or going Back or Forward, asks first, as closing the window does: Save saves and moves on, Don't Save moves on and discards the changes, and Cancel stays on the file. A link you open in a new window leaves this one as it is and asks nothing.

What's Different from a Note

The editor works as it does for notes, with a few differences, because a file isn't part of a brain:

Saving

TheBrain writes to the file only when you save it. Use Save — the default shortcut is Ctrl+S (⌘S on Mac) — or Save As..., whose default shortcut is Ctrl+Shift+S (⇧⌘S on Mac). These shortcuts save only in Markdown file windows; in a brain window the same keys keep their usual commands.

Saving from Rich Text writes the whole file again in standard Markdown. What you see is kept, but some formatting may be written differently, for example list bullets become -. The frontmatter, the file's encoding, its line endings and its byte order mark are kept as they were. Saving from Text view writes exactly what the text editor holds. A file with content the editor can't keep as written, such as HTML, shows a warning when it opens, and the warning goes away after the first save. TheBrain can make a backup copy before saving; see Markdown Files Settings for the details and the backup choices.

The File's Encoding

TheBrain reads a file in the encoding it was saved in and saves it the same way. Most Markdown files are UTF-8; TheBrain also reads UTF-16 and UTF-32 files, and older files in an encoding such as Windows-1252, so their accented letters and symbols show correctly. If you add a character the file's encoding can't hold, such as an emoji in a Windows-1252 file, TheBrain saves the file as UTF-8 instead, with the marker that tells other apps so, and says Saved as UTF-8, because the file's encoding can't hold some of its characters.

When the File Changes on Disk

When a File Can't Be Opened

  • A Markdown file attached to a thought doesn't open in a file window; it opens in the thought's content area (see Viewing Attachments).
  • When you relaunch TheBrain, Markdown file windows come back where they were, with their size and pin. Each opens in Rich Text at the top of the file, and its Back and Forward history starts fresh. Collapsed sections are remembered for each file on this device, even after you close its window and open the file again. A file deleted while TheBrain was closed comes back marked (deleted) only if it had unsaved edits; otherwise its window doesn't return.
  • While a Markdown file window is open, TheBrain keeps running, and on a Mac clicking TheBrain's Dock icon brings it back.
  • A new window opens a little below and to the right of the window you opened it from.

Related Topics