Skip to content

Editor

Lokus uses a ProseMirror-based editor that renders Markdown as rich text. You write in Markdown or use the toolbar — the editor handles both. Files are stored as .md on disk.

Each open tab maintains its own isolated ProseMirror EditorState, including independent undo/redo history, selection, and scroll position. Switching between tabs restores the exact editor state you left.

Content for inactive tabs is held in an LRU cache with a maximum of 20 entries per editor group. When the cache is full, the least-recently-accessed clean (unsaved) entries are evicted first; dirty (modified) entries are preserved. You can reopen recently closed tabs — the last 20 closed tabs are tracked and can be restored into the focused pane.

ActionmacOSWindows/LinuxMarkdown
BoldCmd+BCtrl+B**text**
ItalicCmd+ICtrl+I*text*
StrikethroughCmd+Shift+SCtrl+Shift+S~~text~~
Inline codeCmd+ECtrl+E`code`
HighlightCmd+Shift+HCtrl+Shift+H==text==
UnderlineCmd+UCtrl+U
ActionmacOSWindows/LinuxMarkdown
Heading 1Cmd+Opt+1Ctrl+Alt+1#
Heading 2Cmd+Opt+2Ctrl+Alt+2##
Heading 3Cmd+Opt+3Ctrl+Alt+3###
Bullet listCmd+Shift+8Ctrl+Shift+8- or *
Ordered listCmd+Shift+7Ctrl+Shift+71.
Task listCmd+Shift+9Ctrl+Shift+9- [ ]
BlockquoteCmd+Shift+BCtrl+Shift+B>
Horizontal rule---
ActionmacOSWindows/LinuxMarkdown
Code blockCmd+Opt+CCtrl+Alt+C```lang
Inline math$x^2$
Block math$$E=mc^2$$
CalloutCmd+Opt+CCtrl+Alt+C>[!note]
ActionmacOSWindows/Linux
Fold sectionCmd+Opt+[Ctrl+Alt+[
Unfold sectionCmd+Opt+]Ctrl+Alt+]
Unfold allCmd+Opt+0Ctrl+Alt+0

Click the fold indicator (triangle) next to any heading to collapse everything under that heading until the next heading of equal or higher level.

Type / on any line to open the command menu. Start typing to filter. Navigate with arrow keys, press Enter to insert.

CommandWhat it does
/Heading 1Big section heading
/Heading 2Medium section heading
/Heading 3Small section heading
/Bullet ListUnordered list
/Ordered ListNumbered list
/Task ListCheckbox list
/QuoteBlockquote
CommandWhat it does
/ImageTriggers image embed autocomplete (![[)
/TableOpens a size picker grid (up to 6x8), click to insert
/TemplateOpens the template picker
/Link to FileOpens the file picker, inserts a [[wiki-link]]
/Simple TaskInsert standalone !task syntax
CommandWhat it does
/CodeToggle inline code
/Code BlockInsert a fenced code block
CommandWhat it does
/HighlightHighlight text
/StrikethroughCross out text
/SuperscriptRaise text (x^2)
/SubscriptLower text (H2O)
/Horizontal RuleInsert a divider
CommandWhat it does
/Note CalloutBlue info callout
/Tip CalloutGreen tip callout
/Info CalloutCyan info callout
/Warning CalloutOrange warning callout
/Danger CalloutRed danger callout
/Success CalloutGreen success callout
/Question CalloutPurple question callout
/Example CalloutGray example callout
CommandWhat it does
/Inline MathOpens the math formula modal for inline LaTeX
/Block MathOpens the math formula modal for display LaTeX

Type three backticks followed by a language name, then press Space to create a syntax-highlighted code block:

```javascript
const greeting = "hello";
```

Supported languages include: JavaScript, TypeScript, Python, Java, C, C++, C#, Go, Rust, PHP, Ruby, Swift, Kotlin, CSS, HTML/XML, JSON, YAML, Bash/Shell, SQL, and Markdown. Short aliases work too — js, ts, py, sh, yml, cs, md.

Inside a code block:

  • Enter inserts a newline (stays in the block)
  • Backspace at the start of an empty code block converts it back to a paragraph

Type ```mm (three backticks followed by mm, then a space) to insert a Mermaid diagram block. The block renders the diagram live as you type. Supports flowcharts, sequence diagrams, Gantt charts, and other Mermaid syntax.

Callouts (admonitions) are styled blocks for notes, warnings, tips, and other highlighted content. Create them by typing:

>[!note] Optional title

The callout type goes inside [! ]. Available types:

TypeColorIcon
noteBlueInfo
tipGreenLightbulb
warningOrangeWarning triangle
dangerRedAlert
infoCyanInfo
successGreenCheckmark
questionPurpleQuestion mark
exampleGrayBook

Add a - after the type to make the callout start collapsed:

>[!warning]- Click to expand
Hidden content here.

Click the toggle button in the callout header to expand or collapse it.

Insert a table with the /Table slash command. A size picker grid appears — hover to select dimensions (up to 6 rows by 8 columns), then click to insert.

Tables include a header row by default. Use the bubble menu that appears when you click inside a table to add/remove rows and columns.

Embed images using the ![[filename]] syntax. Type ![[ and an autocomplete dropdown appears showing image files in your workspace. Supported formats: PNG, JPG, JPEG, GIF, WebP, SVG, BMP, AVIF.

You can also paste a URL inside ![[ to embed an external image:

![[https://example.com/photo.png]]

The /Image slash command triggers the same ![[ autocomplete.

Lokus supports LaTeX math via KaTeX.

Inline math: Wrap in single dollar signs: $x^2 + y^2 = z^2$

Block math: Wrap in double dollar signs:

$$
\int_0^\infty e^{-x^2} dx = \frac{\sqrt{\pi}}{2}
$$

You can also use the /Inline Math and /Block Math slash commands to open a formula editor with a live preview.

Type :shortcode: to insert special symbols. Works for Greek letters, math symbols, arrows, and more.

Examples:

ShortcodeSymbol
:alpha:α
:beta:β
:theta:θ
:pi:π
:omega:ω
:Delta:Δ
:Sigma:Σ
:arrow:
:leftarrow:
:uparrow:
:downarrow:
:inf:

The full set includes all Greek letters (lowercase and uppercase), arrows, math operators, logic symbols, and set operations. You can define custom symbols in Preferences.

Paste Markdown text into the editor and it converts to rich text automatically. The editor detects Markdown formatting in clipboard content and compiles it to HTML before inserting.

Pasting inside a code block inserts plain text — no conversion happens.

Lokus has three editor modes, saved per file:

  • Edit — Full rich text editing
  • Live — Live preview of Markdown rendering
  • Reading — Read-only rendered view

Click the triangle icon next to any heading to fold/unfold the content beneath it. Fold state is saved per note in localStorage. Folding collapses all content between the heading and the next heading of equal or higher level.

The editor supports plugin-provided extensions. Plugins can:

  • Register custom ProseMirror nodes and marks
  • Add new slash commands to the / menu
  • Subscribe to editor events
  • Provide autocomplete suggestions

Plugin slash commands appear alongside built-in commands in the slash menu.