1
0
mirror of https://github.com/jbranchaud/til synced 2026-07-05 17:00:17 +00:00

Add View Nicely Formatted Markdown From Terminal as a Workflow TIL

This commit is contained in:
jbranchaud
2026-05-02 12:36:15 -05:00
parent a8c35e2458
commit 3db5af78c1
2 changed files with 41 additions and 1 deletions
+2 -1
View File
@@ -10,7 +10,7 @@ working across different projects via [VisualMode](https://www.visualmode.dev/).
For a steady stream of TILs, [sign up for my newsletter](https://visualmode.kit.com/newsletter).
_1783 TILs and counting..._
_1784 TILs and counting..._
See some of the other learning resources I work on:
@@ -2069,6 +2069,7 @@ If you've learned something here, support my efforts writing daily TILs by
- [Toggle Between Stories In Storybook](workflow/toggle-between-stories-in-storybook.md)
- [Update asdf Plugins With Latest Package Versions](workflow/update-asdf-plugins-with-latest-package-versions.md)
- [View A Nicely-Formatted CSV In Terminal](workflow/view-a-nicely-formatted-csv-in-terminal.md)
- [View Nicely Formatted Markdown From Terminal](workflow/view-nicely-formatted-markdown-from-terminal.md)
- [View The PR For The Current GitHub Branch](workflow/view-the-pr-for-the-current-github-branch.md)
### XState
@@ -0,0 +1,39 @@
# View Nicely Formatted Markdown From Terminal
The `glow` utility is CLI markdown renderer written in Go. It is part of the
CCU ([charmbraclet](https://github.com/charmbracelet) 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](https://github.com/jbranchaud/dotfiles/blob/main/config/mise/config.toml?plain=1#L66).
To view a nicely rendered markdown file, I can run:
```bash
$ glow README.md
```
For long markdown files like [this `README.md`](https://github.com/jbranchaud/til/blob/master/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`.
```bash
$ 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.