In the next article we are going to take a look at Glow. This is a terminal-based Markdown reader which is designed from scratch. This program can find files from Markdown locales, in subdirectories, or in a local Git repository.
Glow is a CLI tool that can render and read Markdown files in the Gnu/Linux terminal. It will also allow us to organize Markdown files. Keep in mind that Glow is not a Markdown editor, so we will not be able to use it to write text in this language.
Install Glow on Ubuntu
Glow can be found available for different operating systems. For Ubuntu and Debian, the creators of this program offer .DEB packages for various architectures.. These packages can be found in your releases page. If you prefer to download the latest version released today of this program, you can also open a terminal (Ctrl+Alt+T) and run in it wget as follows:
wget https://github.com/charmbracelet/glow/releases/download/v1.4.1/glow_1.4.1_linux_amd64.deb
When the download is finished, it will only be necessary to use this other command to install the program:
sudo apt install ./glow_1.4.1_linux_amd64.deb
A quick look at Glow
Glow can be used in two ways: from the CLI and from his TUI.
no arguments
If we run Glow with no arguments, the Textual User Interface (TUI) will be started, and the computer will be scanned for local Markdown files.. The program will find the files in the current directory and subdirectories.
From this interface, we can use the key? to list available hotkeys.
Tabs
The program has tabs. We will can move between these using the tab key.
- At Lóleo Eventos, local tab see locally hosted files.
- La stashed tab works like a bookmark. The program it will allow us to create bookmarks by pressing the 's' key on the file that interests us, or while we see the content. This bookmark will be visible only in the current directory. You can press the 'x' key to delete the bookmark (not the file) or even add a note by pressing the 'm' key.
- La news tab displays changelogs and other messages from Glow developers.
Find Markdown Files
From the TUI, we can also use the -a option to find all Markdown files in the current directory and its subdirectories.
glow -a
In the results we can use the arrow keys to scroll through the files on the screen. It will also allow us to use the help options that are shown at the bottom. The search option in this view will allow us to search for files by name, not by their content..
Load one of the markdown files
The simplest use of Glow is from the CLI, and It will help us to load a Markdown file. The program will display all the rendered content on the screen. To see this, we will only need to type:
glow archivo_markdown
Locator
In the CLI we can use the locator option to display the text of one of the files. We will only have to use the -p option as follows:
glow -p archivo_markdown
In this view we will have the possibility to use the / key and then write a text to search for it in the file. You can press the ' keycorner' to get out of sight.
choose a style
From the terminal, we can also choose a style using the -s option. When no option is provided, the program tries to detect the current background color of the terminal, and automatically chooses the dark or light style.. This can be changed with the command:
glow -s [dark|light]
Help
For get more details on how to use this program, help can be consulted with the command:
glow --help
uninstall
In case you want remove the program from your computer, you just need to open a terminal (Ctrl+Alt+T) and launch the command in it:
sudo apt remove glow
Overall, Glow is a useful tool for viewing and organizing Markdown files from the terminal. Like most tools for the terminal, this one may not be to everyone's liking. For For more information about this software or its use, users can go to its repository on GitHub.