Settings

Theme

Show HN: Command line tool for viewing files in color

soegaard.github.io

1 points by soegaard a month ago · 0 comments · 1 min read

Reader

The tool `peek` show files in color in the terminal. A wide range of popular programming language and file types are supported.

Today I added support for binary files inspired by the HN post on colors in hex editors.

Each supported programming language is backed by its own (reusable) lexer. The lexer provides a stream of tokens to the colorer. Using streams means that you will see the top of large files at once.

The idea to make `peek` came from a need to look at CSS files in the terminal. I wanted color swatches and other niceties from the browser. Also, I wanted an option to fix alignment in machine generated CSS files.

Enjoy.

No comments yet.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection