Terminal Pager

The terminal pager has been mentioned often in my reading about software engineering / computer science, so I figure I will try to learn more about it.

Date Created:

References



Notes


A terminal pager, paging program, or simply pager is a computer program used to view (but not modify) the contents of a text file moving down the file one line or one screen at a time. Some, but not all, pagers move forwards and backwards in text files but cannot move backwards in pipes. less is a more advanced pager that allows movement forward and backward, and conations extra functions such as search.

Examples

  • more
    • Command to view (but not modify) the contents of a text file one screen at a time, available in Unix and Unix-like systems.
$ more [options] [file_name]
    • If no file name is provided, more looks for input from standard input.
    • In the lower-left corner of the screen is displayed the text --More-- and a percentage, representing the percent of the file that more has paged through.
    • When more reaches the end of a file, it exits.
    • The most common methods of navigating through a file are Enter, which advances the output by one line, and SPACE, which advances the output by one screen.
    • Options
      • --num - option specifies an integer which is the screen size in lines
      • -d -causes the program to prompt the user with a message instead of ringing the bell when an illegal key is pressed
      • -f -causes the program to count logical rather than screen lines
      • -p -do not scroll, clear the screen and display the text
      • -c -do not scroll. paint each screen from the top, clearing the remainder of each line as it is displayed
      • -s -squeeze multiple blank lines into one
      • -u - backspace and carriage return are treated as printable characters
      • +/ -specifies a string that will be searched before each file is displayed
      • +num - start at line number num
  • less
    • Similar to more, but allows for backwards navigation.
$ less [options] [file_name]...

Less Commonly Used Commands

  • pg
    • Was a terminal pager for text files, but it has been removed.
  • most
    • similar to less in capabilities
  • nano --view
    • text editor for Unix-like computing systems or operating environments using a command line interface
  • emacs -nw -e "(view-mode)"
    • family of text editors that are characterized by their extensibility
  • w3m
    • free and open source text-based web browser licensed under the MIT license.
    • It differs form other text based browsers by supporting elements such as tables, frames, and images.



Insert Math Markup

ESC
About Inserting Math Content
Display Style:

Embed News Content

ESC
About Embedding News Content

Embed Youtube Video

ESC
Embedding Youtube Videos

Embed TikTok Video

ESC
Embedding TikTok Videos

Embed X Post

ESC
Embedding X Posts

Embed Instagram Post

ESC
Embedding Instagram Posts

Insert Details Element

ESC

Example Output:

Summary Title
You will be able to insert content here after confirming the title of the <details> element.

Insert Table

ESC
Customization
Align:
Preview:

Insert Horizontal Rule

#000000

Preview:


Insert Chart

ESC

View Content At Different Sizes

ESC

Edit Style of Block Nodes

ESC

Edit the background color, default text color, margin, padding, and border of block nodes. Editable block nodes include paragraphs, headers, and lists.

#ffffff
#000000

Edit Selected Cells

Change the background color, vertical align, and borders of the cells in the current selection.

#ffffff
Vertical Align:
Border
#000000
Border Style:

Edit Table

ESC
Customization:
Align:

Upload Lexical State

ESC

Upload a .lexical file. If the file type matches the type of the current editor, then a preview will be shown below the file input.

Upload 3D Object

ESC

Upload Jupyter Notebook

ESC

Upload a Jupyter notebook and embed the resulting HTML in the text editor.

Insert Custom HTML

ESC

Edit Image Background Color

ESC
#ffffff

Insert Columns Layout

ESC
Column Type:

Select Code Language

ESC
Select Coding Language