Pager

From Gentoo Wiki
Jump to:navigation Jump to:search
This article is a stub. Please help out by expanding it - how to get started.
Resources

A pager is a tool for displaying the contents of files or other output on the terminal, in a user friendly way, across several screens if needed.

Available software

This is just a partial selection of pagers available in Gentoo.

Name Package Description
Bat sys-apps/bat cat(1) clone with syntax highlighting and Git integration.
Less sys-apps/less Free, open-source file pager, almost ubiquitous on Linux. Included in the @system set.
More sys-apps/util-linux Basic pager, part or util-linux included in the @system set.
Most sys-apps/most Paging program that displays, one windowful at a time, the contents of a file.
Nvimpager app-editors/neovim Use nvim as a pager to view manpages, diffs, etc with nvim's syntax highlighting.
w3m virtual/w3m It is a pager and a terminal web-browser with optional configuration. A better substitute for `less` and actually a quite good web browser, if correctly configure. Exceptionally good for man pages, since it supports going to next man pages and has tabs, history etc. Also, it is possible to get rendered text into your EDITOR.

Also consider emerging app-editors/vim with USE=vim-pager.

Default pager

The default pager can be configured by setting the PAGER environment variable, and similarly, the default manpager can be configured by setting the MANPAGER environment variable:

FILE ~/.bashrcSet PAGER and MANPAGER variable
PAGER="less"
MANPAGER="less"

The default pager can be modified using the eselect command.

See also