MD-TUI
MD-TUI is a TUI application for viewing markdown files directly in your
terminal. I created it because I wasn't happy with how alternatives handled
links in their applications. While the full markdown specification is not yet
supported, it will slowly get there. It's a good solution for quickly viewing
your markdown notes, or opening external links from someones README.
Installation
Using cargo: cargo install md-tui --locked
Using AUR: yay -S md-tui-bin
Usage
Start the program running mdt <file.md> or just mdt. The latter will search
recursively from where it was invoked for any markdown file and show it in a
file tree.
Key binds
| Key | Action |
|---|---|
j |
Scroll down |
k |
Scroll up |
l |
Scroll one page down |
h |
Scroll one page up |
r |
Reload file |
f or / |
Search |
n or N |
Jump to next or previous search result |
s or S |
Enter select link mode. Different selection strategy. |
Enter |
Select. Depending on which mode it can: open file, select link, search |
Esc |
Go back to normal mode |
t |
Go back to files |
b |
Go back to previous file (file tree if no previous file) |
g |
Go to top of file |
G |
Go to bottom of the file |
d |
Go down half a page |
u |
Go up half a page |
q |
Quit the application |
Syntax highlighting
MD-TUI supports syntax highlighting in code blocks for the following
languages:
- Rust
- JavaScript
- Java
- Go
- Python
- Ocaml
- Json
- Bash/sh
- C/C++
- Lua
Configuration
The program checks for the file ~/.config/mdt/config.toml at startup. The
following parameters and their defaults are written below. Setting color to ""
will not remove it, but leave it as its default. To remove colors, set it to
reset.
# General settings
= 80
# Inline styling
= "reset"
= "reset"
= "reset"
= "reset"
= "red"
= "#2A2A2A"
= "blue"
= "green"
= "darkgrey"
# Block styling
= "blue"
= "black"
= "reset"
= "#2A2A2A"
= "yellow"
= "reset"
# File tree
= "lightgreen"
= "lightgreen"
= "blue"
= "gray"
= false
# Quote bar
= "lightred"
= "lightYellow"
= "lightgreen"
= "lightblue"
= "lightmagenta"
= "white"
Links
MD-TUI currently supports [text](url), [[link]], and [[link|Some title]]
type of links.
Contributions
Both PRs and issues are appreciated!