← Back to Magister Code

Magister Code User Guide

Magister Code is a fast, native macOS editor for code and text, built around side-by-side fixed-width editor columns, an integrated terminal under every column, a project sidebar, and configuration that lives entirely in plain CSON files you can edit like any other document.

Windows & Projects

Each window holds one workspace, usually one project. A project is a .magistercode file that remembers your sidebar folders, the editor/terminal split of every column, your terminal tabs — names and working directories — and your full editing session.

  • Multiple projects at once. Opening a project while another is in use opens it in a new window; the one you're working in is never replaced. If that project is already open somewhere, its window is focused instead. File > New Window (cmdshiftn) opens an empty window, and the Window menu lists open windows by project name.
  • Sessions and hot exit. Every pane's open tabs, cursor, and scroll position are saved in the project file and restored when you reopen it. Unsaved changes — including untitled scratch buffers — are carried across quit and relaunch, so quitting never loses an edit. Quitting with several projects open reopens all of them next launch.
  • Auto-saved project file. The project file rewrites itself shortly after folders or layout change and when the window closes, so even a force-quit loses at most the last moments of layout.
  • External changes. If a file changes on disk outside the app, clean tabs reload silently; a tab with unsaved changes asks whether to keep your version or reload. Autosave never overwrites a file that changed on disk behind your back.
  • Close. cmdw closes the window and its project; the app keeps running. cmdshiftw closes just the current file tab. Quitting reopens exactly the projects that were open — including none: close everything, quit, and the app relaunches with no window at all; a Dock click opens a fresh empty window.
  • Open Recent. File > Open Recent lists your recent projects and recently opened files in two sections — files you opened individually (Open File, a Finder drop on an editor, or a system open), not every file clicked in the tree — with Clear Menu at the bottom.

Editors & Tabs

  • Fixed-width columns. One to four editors sit side by side, each a configurable character width (editor.columnWidth, default 80). Widen the window and more columns appear; narrow it and they hide, keeping their tabs and state for when there's room again. When a window drag ends, the window snaps to exactly the columns that fit.
  • Tabs. Each editor has its own tabs. Click a name to switch, the left-side x to close (with confirmation if unsaved). Drag a tab to another editor to move it, unsaved state and all. cmdshift] / [ cycle tabs; cmd14 focus a column. With more tabs open than fit, the strip scrolls — hover over the tabs and use the scroll wheel or trackpad — and the active tab always scrolls into view so the current file is never hidden.
  • Two views of one file. View > New View of File (or the split toolbar button) opens the current file in the most recently used other editor. Both views share one buffer: typing in either appears in the other immediately, and there is one undo history and one modified state. Opening the same file in another column by any route shares the buffer the same way.
  • Soft wrap. Lines wrap at the column width; there is no horizontal scrolling.
  • Drop to open. Drag a file from Finder onto an editor pane to open it right there — nothing is added to the sidebar (drop on the sidebar when you want a project root).
  • Autosave. Modified files save automatically when focus leaves the editor (disable with editor.autoSaveOnFocusLoss).
  • Path in the title bar. The title bar shows the full path of the file you are editing, following the active tab as you switch tabs and columns. Long paths truncate from the left so the filename stays visible. Disable with editor.showPathInTitleBar: false.

Editing Commands

Every shortcut below is a default from the keys section of settings and can be rebound. Menus that mirror a bindable command update their displayed shortcut when you rebind it.

KeysCommandWhat it does
cmdz / cmdyundo / redo Undo groups edits made close together and restores the exact cursor, selection, and any extra cursors.
optbackspaceeraseWord Erases one word part: with the cursor after thisIsATest it removes Test, then A, then Is, then this.
cmdbackspaceeraseFullWord Erases the whole previous word in one step.
ctrla / ctrlelineBegin / lineEnd Jump to the first / past the last non-whitespace character of the line.
cmd] / cmd[indent / unindent With no selection, acts on the current line's leading indentation and keeps your cursor at the same spot in the text.
cmd/comment Toggles line comments using the language's comment marker.
returnnewLine New line with the current indentation, one level deeper after {, [, (, or :.
cmdc / x / vcopy / cut / paste With no selection, copy and cut take the whole current line; pasting a line taken that way inserts it above the current line.
cmddduplicate Duplicates the selection in place (new copy selected) or, with no selection, the current line — at every cursor. The clipboard is not touched.
f5 / f6setMarker / selectFromMarker Drop a visible marker, then select from it to the cursor. escape clears it.
f8 / shiftf8selectWord / selectWordAll Select the word under the cursor; repeat to add the next occurrence, or select all occurrences at once. Press left/right to turn the occurrences into multiple cursors — or use a word command (skipWord, eraseWord, eraseFullWord), backspace, return, indent, or unindent to convert and apply at every occurrence in one step.
ctrlshiftg / hupperChar / lowerChar Change the case of the character at the cursor.
ctrlshiftk / jallLowerWord / allUpperWord Lower/uppercase the selection, or the word at the cursor.
ctrlshifta/s/b/,camelCase Join the previous 2–5 words into camelCase.
ctrlshiftz/x/c/vtypeCase Join the previous 2–5 words into TypeCase.
ctrlshiftf12strip Deletes spaces left of the cursor; then collapses the nearest run of spaces on the line to one; then removes the nearest single space. Leading indentation is only stripped once nothing else on the line matches.
ctrlshiftf7timestamp Inserts a timestamp like === Wed Jul  1 04:22:03 2026.
unboundsortLines Edit > Sort Lines sorts the selected lines lexically.

Edit > Emoji & Symbols (ctrlcmdspace) opens the system character palette.

The color picker

Right-click (or ctrl-click) any #RRGGBB color value in a document and the macOS color picker opens preset to that exact color. As you adjust it, the new value is written back into the text live — undo, the modified state, and syntax coloring all stay in step, so picking a color is just another edit.

It works on the literal wherever it appears, including inside quotes like "#1F2430" — which makes it the fastest way to tune your theme: open Settings, right-click any entry in the colors section, and dial in the shade visually. Save, and the app restyles immediately.

Multiple Cursors

  • cmd-click anywhere to toggle an additional steady cursor.
  • Typing, return, paste, backspace, word erase, word and line movement, indent, strip, timestamp, line copy/cut, and case commands apply at every cursor. Selection-based commands collapse back to one cursor.
  • Undo restores the exact multi-cursor state from before an edit.
  • f8 occurrences plus left/right are the fastest way to get a cursor on every instance of a word.

Autocomplete

tab completes the identifier you are typing. Candidates come from the current file (ranked highest), a project-wide index of identifiers in files of the same language, and the language's keywords and types. Arrows navigate, return or tab accepts, escape cancels.

Completion only offers itself immediately after typing; after moving the cursor, clicking, or any other command, tab indents as usual. It also falls back to indenting when there is a selection, several cursors, or no candidates.

Find & Replace

  • Find (cmdf) opens a bar at the bottom of the window with regular-expression and case-sensitivity toggles. return finds the next match, wrapping at the end. escape dismisses. The query field is a full Magister editor — your shortcuts, multiple cursors, and undo work inside it.
  • Find Again (cmdg) repeats the last search from the cursor — same query and options — without opening the bar, wrapping at the end.
  • Replace (cmdr) adds a replacement row. Replace changes the selected match and advances; Replace All reports its count. In regex mode $1-style captures work in the replacement. tab moves between the two fields.
  • Project-wide find/replace. Right-click a folder in the sidebar and choose Find/Replace. A Location row takes comma-separated search roots and filename globs like *.swift. Results open as a document: each match shows five lines of context, syntax-colored, and clicking a header or context line jumps to that exact spot in the file. Replace All confirms with a count before rewriting files, and open clean tabs reload automatically.
  • Quick Open (cmdp) filters every file in your project by space-separated fragments, ranked best-first: exact filename matches, then filename prefixes, then filename substrings, then matches only in the directory path. up/down move through the matches while you keep typing, return opens, escape dismisses. The panel shrinks to fit short match lists.
  • Go to Line (cmdl) pops a small dialog over the active editor; type a line number and return.
  • Drag folders (or individual files) from Finder into the sidebar to add them as project roots — the insertion line shows where they will land. Dropping a .magistercode file opens it as a project.
  • Rearrange project roots by dragging them within the sidebar; the order is saved with the project.
  • Rows show a type icon: colored language badges for recognized source files, a folder symbol for directories. Recognition follows the same extension lists as syntax highlighting.
  • The tree watches the filesystem: files created, renamed, or deleted outside the app appear after a moment. View > Refresh Tree (cmdshiftr) forces it.
  • .gitignore aware. Files and folders matched by your .gitignore rules — including nested .gitignore files in subdirectories, with negation and the usual glob syntax — are hidden from the tree and left out of Quick Open and project-wide search, just as git hides them from status. An ignored file still opens normally through File > Open File and stays open in its tab.
  • Right-click for file management: New File (asks for a name and creates the file right there — inside the folder, or next to the file, you clicked; on a root-level file entry the new file joins the tree right after it — then opens it), New Folder, Rename, Delete (to the Trash), Copy Path, Show in Finder, Remove from Project (the disk is untouched), and Find/Replace on a folder's subtree.
  • Drag the sidebar's divider to resize it — the window grows or shrinks to follow, so your editor columns keep their exact width and never hide.
  • View > Toggle Tree hides the sidebar; the window snaps so editor columns keep their exact width. Expanded folders are remembered.

Git Integration

  • For files inside a git repository, the line-number gutter marks your uncommitted work against HEAD — live, including unsaved edits: a green bar on added lines, amber on modified lines, and a short red tick where committed lines were deleted. Untracked files mark every line added.
  • f7 (nextGitChange) jumps to the next change in the file, wrapping around at the end.
  • The three mark colors (gitAdded, gitModified, gitRemoved) are themeable.

The Terminal

  • Every visible editor column has its own shell underneath it, on a real pseudo-terminal: full-screen programs like top, vim, nano, and less work, with colors, the alternate screen, and live reflow when you resize the pane.
  • Terminal tabs. cmdt (the newTerminalTab command, also View > New Terminal Tab) opens another shell in the focused column's terminal as a numbered tab. With a single terminal there are no tabs — the pane looks as it always has; the numbered strip appears from the second tab on. Click a number to switch, or its x to close — closing asks for confirmation when that terminal is running a command. Right-click a tab to name it: the name replaces the number, clearing it brings the number back, and tabs with their names are saved and restored with the project — including each terminal's working directory, so reopening a project puts every shell back where you left it. While a terminal has focus, the tab-cycling keys (cmdshift] / [) switch its terminal tabs, close file (cmdshiftw) closes the current terminal tab, and cmd14 focus the corresponding column's terminal.
  • Drag the divider between editor and terminal anywhere — including all the way to either edge to give the whole column to one or the other. Each column's split is remembered in the project.
  • View > Toggle Terminal (cmd`) shows and hides the terminal row.
  • Links. http(s) URLs in terminal output — and in plain text documents in the editor — are colored and underlined. Right-click a link — in either place — to open it in your default browser (Open Link) or put it on the clipboard (Copy Link). A normal click never opens anything, so clicking around a link is safe. (In the editor, cmd-click on a link also opens it; off a link, cmd-click places extra cursors as usual.) The color is the themeable link entry in colors.
  • Editing shortcuts at the prompt. The editor's word commands work on the shell command line too, with the same keys bindings: eraseWord (one camelCase part), eraseFullWord, skipWord, camelCase / typeCase (join the previous words), and strip (delete or collapse spaces left of the cursor). The edit is replayed through the shell's own line editor, so it works in any shell.
  • Click and drag to select — across any number of lines, like a normal terminal. Triple-click selects a line; double-click selects a word (terminal.wordCharacters controls what counts as part of one, so paths select whole); cmdc copies, cmdv pastes. Scrollback is kept; if a shell exits, return restarts it.
  • The font, text and background colors, and the sixteen-color ANSI palette are all configurable.

The Toolbar

Every available toolbar button, with the id used to configure it:

IdButtonWhat it does
openFolderOpen FolderAdds a folder to the sidebar as a project root.
openFileOpen FileOpens files in the active editor.
saveSaveSaves the active file.
quickOpenQuick OpenOpens the fragment-filtered file chooser.
findFind/ReplaceOpens the find bar.
terminalToggle TerminalShows or hides the terminal row.
newViewNew View of FileOpens the current file in another editor, sharing one buffer.
gotoGo to LinePops the line-number dialog over the active editor.
emojiEmoji & SymbolsOpens the system character palette.
toggleTreeToggle TreeShows or hides the sidebar.
refreshTreeRefresh TreeReloads the sidebar from disk.

All of them appear by default. The set and order are yours to change — list the ones you want in the settings toolbar.items (unknown ids are ignored):

toolbar: {
  items: [openFolder openFile save quickOpen find terminal]
}

The icon color is the toolbarForeground entry in colors; when that entry is absent the icons follow the editor foreground.

Settings

Magister Code > Settings (cmd,) opens ~/.magister-code/settings.cson, created from the defaults the first time. Saving the file applies changes immediately — fonts, colors, shortcuts, layout — no restart. Invalid edits are ignored until the file parses again.

  • editor — font, size, tab width, the fixed column width, how many editors can appear, focus-loss autosave, and the title-bar file path.
  • terminal — terminal font, double-click word characters, and historyLines, the lines of scrollback kept before the oldest are discarded (default 10000).
  • sidebar — tree text size.
  • toolbar — which buttons appear, in order.
  • colors — window chrome, syntax colors, terminal colors and ANSI palette, the toolbar icon color (toolbarForeground), git gutter marks, link color, and the cursor. Right-click any value to pick visually.
  • keys — every editable shortcut. Write chords with commas: "cmd+k,cmd+b": {toggleTree}. A key can run a sequence: "ctrl+shift+f6": [{selectFromMarker} {copy} {deselect}]. Modifier order doesn't matter.

Reverting to defaults

Your settings file always shows the complete, effective configuration. Whenever it is saved, any default entry that is missing is filled back in with its default value — so deleting an entry and saving is how you revert that setting to its default. Remove a color you've been experimenting with, save, and the default value reappears in place; delete the whole colors section and the full default palette comes back. To reset everything, delete the file's contents, save, and the complete default configuration is rebuilt.

To change a setting, edit its value rather than deleting it — edits are always respected. New settings introduced by app updates appear in the file automatically the same way.

Language Modes

Twenty languages get full syntax coloring — C++, Python, Swift, JavaScript, JSON, CSON, Rust, Perl, HTML, Java, Go, TypeScript, Shell, CSS, Markdown, C#, Kotlin, SQL, YAML, and TOML; anything else opens as plain text. Magister Code > Modes opens each language's own CSON file (in ~/.magister-code/modes/) where you can change its file extensions, keywords, and type names — custom extensions automatically pick up highlighting, sidebar badges, and language-aware autocomplete.

License Registration

Until a license is registered the app runs in evaluation mode: a red notice on the right side of the title bar reads [UNREGISTERED - SAVE DISABLED], and saving files (including autosave, hot-exit, and project-wide Replace All) is disabled. Everything else works — files still open, and which files were open plus cursor positions are remembered — but edits made while unregistered are not written anywhere and do not survive quitting.

After purchasing, choose Magister Code > Register License Key… and enter the email address you purchased with and the license key from your receipt. Validation happens entirely on your Mac — nothing is sent anywhere — and your registration is remembered. The notice disappears and saving is enabled the moment the key validates.

Updates

Magister Code checks for updates at launch and daily, and installs them in one click. Magister Code > Check for Updates… checks on demand.

The Help menu holds this guide (Magister Code Help, cmd?) and a Website link. Help > Magister Code Help reopens this document any time.