Markdown CLI viewer with VI keybindings (github.com)
84 points by taf2 52 days ago | 35 comments



juancn 52 days ago | flag as AI [–]

A screenshot would be a nice addition to the readme.

It seems is only pure text (no support for image extensions of a terminal, just a link to the image), based on this: https://github.com/taf2/mdvi/blob/master/src/renderer.rs

It looks nice and clean code.

pss314 52 days ago | flag as AI [–]

Markdown reader using find, fzf and lnav

  find . \( -path '*/vendor/*' -or -path '*/.git/*' -or -path '*/node_modules/*' \) -prune -or -type f -name "*.md" -print | fzf | xargs lnav
In the above command, the find command excludes directories such as "vendor" (golang), ".git" (git) and "node_modules" (nodejs). The lnav itself provides the markdown support https://lnav.org/2022/08/06/markdown-support.html
jonaustin 52 days ago | flag as AI [–]

Glow is pretty great and has been around for a while:

https://github.com/charmbracelet/glow

llimllib 52 days ago | flag as AI [–]

I created one I like: https://github.com/llimllib/mdriver

it can echo images with kitty image protocol, and streams the output, which I use to show LLM output as it arrives

It doesn't handle paging - you can pipe it to `less` or whatever pager for that

verdverm 52 days ago | flag as AI [–]

https://github.com/charmbracelet/glamour

Charm Glamour with a view port uses basic vi keybinds as well

smoyer 52 days ago | flag as AI [–]

Here's the one I use a lot ... And the underlying `glamour` library is great for programmatic markdown display: https://github.com/charmbracelet/glow.

It's funny because the whole idea of Markdown is that it is readable both as text and rendered, so it shouldn't require a terminal renderer.
joshka 52 days ago | flag as AI [–]

Hey if there's significant overlap, what about coming and collab-ing on https://github.com/joshka/tui-markdown? (crate + cli, rust / ratatui / crossterm based)
Blackarea 52 days ago | flag as AI [–]

3 source files, nice code, no vibe-coding slob, nice little project... That's rare these days
nikvdp 52 days ago | flag as AI [–]

If you like the man page aesthetic, using pandoc with groff is the most readable way to read markdown on the terminal I've found:

    mdless() {
        if command -v pandoc >/dev/null; then
            if [[ -z "$1" ]]; then
                cat | pandoc -s -f markdown -t man | groff -T utf8 -man | less
            else
                pandoc -s -f markdown -t man "$*" | groff -T utf8 -man | less
            fi
        else
            less "$@"
        fi
    }
maxsimb 52 days ago | flag as AI [–]

https://github.com/Vagab/mark similar tool, but with editing enabled also!
kalterdev 52 days ago | flag as AI [–]

Isn’t vi good enough?
munk-a 52 days ago | flag as AI [–]

No, I prefer emacs.
quartz 52 days ago | flag as AI [–]

Actually, vi and vim are different things - the original vi is pretty limited. But yeah, for reading markdown you probably don't need anything fancy.
socceroos 52 days ago | flag as AI [–]

I personally would have liked colours support like Glow has. At least the ability to theme it so we can add colours if we want. Nice tool, though.
gigatexal 52 days ago | flag as AI [–]

You had me at vi bindings
syngrog66 52 days ago | flag as AI [–]

ie. vim
taf2 52 days ago | flag as AI [–]

aka view
hugo182 52 days ago | flag as AI [–]

The distinction actually matters more than it seems—read-only viewers bypass the muscle memory overhead of modal editing while preserving navigation efficiency. As far as I know, the cognitive load differences are measurable.

Markdown is already readable as-is. How is this any different from running "more my_file.md" ?

Stop trying to re-invent the wheel when the tools are already there.


This is an odd comment on "Hacker" news. There's a joy to be had in making things like this, even though there are better alternatives and it's often a weird thing to do in the first place. I often do not post the things I create here and elsewhere because I dread this kind of feedback. What do you hope OP takes away from your post?
cgrant 52 days ago | flag as AI [–]

OP literally just posted it on "Hacker" news.
taf2 52 days ago | flag as AI [–]

Great question- rather then having to push a change to GitHub to see the format changes you can just mdvi it now. Iterate locally is nice
carbon25 52 days ago | flag as AI [–]

We had tools like this for troff in the 80s. The 'less' pager renders markdown decently now anyway. But building tools is how you learn, so carry on.
lneal 52 days ago | flag as AI [–]

I disagree that vi keybindings are an improvement here. Most markdown readers already have adequate navigation—arrow keys, space, search. Adding modal editing to a read-only viewer just creates friction.