Skip to content
PT

Static copy

Copied from docs/guides/en/markdown.md in https://github.com/poppy-team/oride (MIT). Pinned to revision 1cd515630b8ceb57777d466bee4970fe7c2e30e0, blob c871b2d50535ddf415ec663012a35b6ef559cbd8. The source repository remains canonical; this copy is refreshed through a sync pull request, not live.

Markdown in Oride ​

Native, first-class Markdown and derivative document support.


File Extensions ​

ExtensionLanguageId
.md, .markdown, .mdown, .mkd, .mkdn, .mdwn, .mdtxt, .mdtextmarkdown
.rmd, .qmdmarkdown
.mdxmdx (highlighted as Markdown)
README, CHANGELOG, LICENSE, etc.markdown

Syntax Highlighting ​

Powered by a dual-stage tree-sitter-md pipeline:

  1. Block Grammar: Headings, ordered/unordered lists, code fences, tables, and blockquotes.
  2. Inline Grammar: Bold, italic, hyperlinks, strike-through, and inline code spans.
  3. Official queries with robust fallback by node.kind().
  4. Code Fence Injections: Code within ```lang blocks is highlighted using the respective language grammar. Supported aliases include rust/rs, c/h, bash/sh/shell, python/py, js/javascript, ts/typescript, html, css, and more.

Dedicated token theme colors: heading, emphasis, strong, link, code, list_marker, and quote.


Editing Features ​

ActionDefault ShortcutBehavior
Soft WrapAlt+ZToggles visual word wrapping; enabled by default for Markdown
Toggle CommentCtrl+/Injects <!-- line --> for Markdown/HTML; // for code
Enter in ListEnterContinues list prefix (- , * , 1. , - [ ] , > )
Enter on Empty PrefixEnterCleans prefix and exits list

Also accessible via Command Palette (Ctrl+Shift+P): Toggle soft wrap, Toggle comment.


In-Terminal Markdown Preview ​

Shortcut: Ctrl+Shift+V or Alt+P. Opens a synchronized side-by-side read-only preview pane that follows your buffer scroll position.

Rendered Elements ​

ElementPreview Representation
Headings (#)Scaled visual hierarchy and line spacing
Lists / TasksBullet points (•) and checkboxes ([ ] / [x])
BlockquotesIndented line prefix │ with styled text
Code FencesFenced frame blocks with syntax highlighting
Inline Spanscode, bold, italic, strikethrough
HyperlinksFormatted as text → url (clickable via mouse or Alt+Enter)
TablesUnicode box-drawing tables with column alignments
FrontmatterDimmed metadata card at document top
ImagesVisual placeholder card or terminal graphics protocol

Image Handling ​

An image link alone on a line renders as a visual card:

  • Relative paths are resolved against the directory of the open .md file.
  • Remote URLs (http:// or https://) display a remote reference badge.
  • When terminal_images = true in config and running on a supported terminal emulator (Kitty, Ghostty, WezTerm), images are rendered directly using terminal graphics protocols.

Verification ​

bash
cargo test -p oride-syntax