miter is a lightweight, cross-platform Markdown editor built with Qt 6. It focuses on fast typing, stable highlighting, and predictable editing behavior.
- Multi-tab Markdown editing workflow.
- Real-time Markdown highlighting with stateful block parsing.
- Extended inline syntax support:
++underline++==highlight==- superscript
^text^ - subscript
~text~ - strikethrough
~~text~~(strike-out font style)
- LaTeX support:
- inline
$...$ - display
$$ ... $$ - environment blocks
\begin{env} ... \end{env}
- inline
- Link and image support:
[text](url)- linked image
[](link-url) - angle autolinks
<https://example.com>and<user@example.com>
- Task list checkbox marker highlighting (
[ ],[x],[X]). - Blockquote styling with a distinct gray background and quote-border color.
- White theme readability tuning with deeper neutral-gray token colors.
- Shared parser/editor continuation rules (lists and blockquotes) to keep typing behavior and highlighting consistent.
- Focus mode dims only visible viewport lines (avoids O(n) extra-selections on every cursor move).
- Enter auto-close for
$$and fenced blocks reuses highlighter context state when available. - Word/char stats are debounced to reduce per-keystroke CPU wakeups in long writing sessions.
- Ordered-list renumbering is localized to nearby list runs instead of scanning the full document.
- Pair autocomplete at line end (no non-space text after cursor):
(),[],{}<>$...$`...`
- Closer skip-over behavior:
- typing a closer on an existing closer moves cursor right instead of inserting.
- Enter-based multiline autocomplete:
$$becomes:- opening
$$ - empty line
- closing
$$
- opening
- lines starting with three backticks (for example, backtick-fence plus language tag like
python) auto-insert a closing fence. \\begin{env}auto-inserts matching\\end{env}.
- Enter line continuation:
- list continuation for ordered/unordered/task items
- blockquote continuation with preserved indentation and quote depth
- continuation matching is shared with
BlockParserline parsers
- Horizontal-rule safety:
***,- - -, and* * *are not treated as lists on Enter.
- Setext heading underline variants:
===is always rendered as a visible underline marker.---(3+ dashes) applies setext H2 heading behavior when it follows a non-empty text line in the same container context (including same-level blockquotes).***,- - -, and* * *remain horizontal rules and do not apply setext H2 behavior.
Complete behavior details are documented in spec.md.
- src/editor: editor widgets, keyboard behaviors, tab/session/search management.
- src/highlight:
MdHighlightertoken-to-format rendering. - src/parser: block parser, inline parser, LaTeX parser, context stack.
- src/config: settings/theme loading.
- themes: TOML theme files.
- tests: parser/editor/highlighter regression tests.
- scripts: platform packaging and local update scripts.
cmake -S . -B build
cmake --build build -j$(nproc)
./build/miterOpen files directly:
./build/miter notes.md todo.mdbrew install cmake qt
cmake -S . -B build -DCMAKE_PREFIX_PATH="$(brew --prefix qt)"
cmake --build build -j$(sysctl -n hw.ncpu)
open build/miter.appcmake -S . -B build -DCMAKE_PREFIX_PATH="C:/Qt/6.8.0/msvc2022_64"
cmake --build build --config Release
.\build\Release\miter.exeRun full test suite:
cmake --build build -j$(nproc)
cd build
ctest --output-on-failureMarkdown-focused tests:
cmake --build build -j$(nproc) --target test_block_parser test_inline_parser test_latex_parser test_md_editor test_highlighter
cd build
ctest --output-on-failure -R "test_block_parser|test_inline_parser|test_latex_parser|test_md_editor|test_highlighter"Run packaging on the target OS.
./scripts/package-macos.shOutput: .dmg in the macOS build directory (default build-macos/).
powershell -ExecutionPolicy Bypass -File .\scripts\package-windows.ps1Output: .zip in the Windows build directory (default build-win\).
./scripts/update-local.shDefault install target: ~/.local.
Ctrl+O: open/import fileCtrl+S: saveCtrl+Shift+S: save asCtrl+T: new tabCtrl+W: close tabCtrl+Tab: next tabCtrl+Shift+Tab: previous tabCtrl+F: searchCtrl++/Ctrl+-/Ctrl+0: zoom in/out/resetCtrl+L: toggle line numbersCtrl+Shift+W: toggle word wrapF11: focus modeF12: fullscreen
- Theme files live in themes.
- Use the toolbar theme button to switch dark/white themes.
- Settings are stored in:
- Linux:
~/.config/miter/config.toml - macOS:
~/Library/Preferences/miter/config.toml - Windows:
%LOCALAPPDATA%\\miter\\config.toml
- Linux:
Example:
[editor]
tab_size = 2tab_size controls inserted spaces for Tab and list indentation logic.
See NOTICE for third-party references and notices.
GPL-3.0