smarkdown-0.2.0 is not a library.
Smarkdown
A simple, lightweight terminal markdown notepad.
Built with ratatui and crossterm, running fully inside your terminal
and inheriting its color scheme instead of forcing its own.
Features
- Terminal-native TUI, resizes with your terminal window
- Follows your terminal's own ANSI color palette by default
- Notebook-style layout: line numbers and a red margin rule
- Inline markdown highlighting while editing (
#,**bold**,*italic*,`code`,> quote) - Preview mode with rendered markdown, toggled with
Ctrl+Tab - Markdown tables and hyperlinks, rendered nicely in preview
- Click a hyperlink to open it in your default browser
- Text selection (
Ctrl+A,Shift+Arrows, mouse drag), copy/cut/paste through the system clipboard - Undo (
Ctrl+Z) - Toggleable word wrap (
Shift+Q); when off, the view scrolls horizontally to follow the cursor, nano/micro-style - Auto-closing pairs for
(),[],{},",',`,*,_ - Configuration through a TOML file, no recompiling needed
Build
cargo install smarkdown
Run
smarkdown path/to/file.md
Running without an argument opens an empty, unsaved note.
Keybindings
| Key | Action |
|---|---|
Ctrl+S |
Save |
Ctrl+O |
Open file |
Ctrl+N |
New note |
Ctrl+Q |
Quit |
Ctrl+Tab |
Toggle Edit / Preview mode |
Shift+Q |
Toggle word wrap |
Ctrl+A |
Select all |
Shift+Arrows / mouse drag |
Select text |
Ctrl+C / Ctrl+X / Ctrl+V |
Copy / cut / paste |
Ctrl+Z |
Undo |
| Click on a link (Edit mode) | Open it in your browser |
Ctrl+Tab requires a terminal that supports the Kitty keyboard protocol
(Alacritty, kitty, WezTerm, and others). On terminals without it, plain
Tab may be sent instead.
Configuration
On first run, Smarkdown creates ~/.config/smarkdown/config.toml.
Colors accept ANSI names (red, cyan, darkgray, reset, ...), or
rgb:R,G,B / indexed:N if you want to bypass the terminal's palette.
[]
= "reset"
= "reset"
= "cyan"
= "magenta"
= "yellow"
= "magenta"
= "green"
= "darkgray"
= "darkgray"
= "blue"
= "darkgray"
= "red"
= "black"
= "cyan"
[]
= true
= true
= 4
= 4
= true
= true
License
MIT.