Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 1.33 KB

File metadata and controls

40 lines (29 loc) · 1.33 KB

View Nicely Formatted Markdown From Terminal

The glow utility is CLI markdown renderer written in Go. It is part of the CCU (charmbraclet CLI universe). And yes, I just made up CCU.

glow is great because it processes and outputs a markdown file with some styling tailored to a terminal including:

  • colors to emphasize things like headings
  • styling of inline code snippets
  • syntax highlighting for fenced code blocks
  • rendering of markdown tables
  • and a lot more that I'm not thinking to mention

In the past I've installed this with brew, but I currently manage my glow install with this mise config.

To view a nicely rendered markdown file, I can run:

$ glow README.md

For long markdown files like this README.md, this doesn't work too well because it renders until the end and spits you at at the bottom.

Fortunately, glow has a built-in pager that maintains all the styling while allowing you to navigate and search similar to less.

$ glow -p README.md

There is also a TUI version (-t), but I find that less intuitive and useful than the pager.

See glow --help for more details.