Skip to content

jkersey/mdread

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mdread

A terminal markdown viewer built with ncurses. Renders markdown files with styled headers, bold/italic text, code blocks with syntax highlighting, tables, lists, and more.

Features

  • Headers (h1-h6) with colored formatting
  • Inline styles: bold, italic, inline code, links
  • Code blocks with per-character syntax highlighting
  • Tables with aligned columns
  • Lists (unordered)
  • Horizontal rules
  • Word wrapping with proper Unicode/wide-character support
  • Keyboard navigation with scrolling

Syntax highlighting

Code blocks are highlighted instantly using a built-in tokenizer for C, Python, Shell, and JavaScript/TypeScript. If pygmentize is installed, mdread upgrades the colors asynchronously in the background -- the document appears immediately and richer highlighting fills in without blocking.

Dependencies

  • C compiler (gcc)
  • ncursesw (wide-character ncurses)
  • pygmentize (optional, for enhanced syntax highlighting)

On Debian/Ubuntu:

sudo apt install build-essential libncursesw5-dev pkg-config
sudo apt install python3-pygments  # optional

Build

make

Install

sudo make install

Installs to /usr/local/bin by default. Override with PREFIX:

make PREFIX=~/.local install

Usage

mdread <file.md>

Controls

Key Action
j / s / Down Scroll down
k / w / Up Scroll up
Space / Page Down Page down
b / Page Up Page up
g / Home Go to top
G / End Go to bottom
q / Esc Quit

License

MIT

About

Terminal markdown viewer with syntax-highlighted code blocks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors