Basic "info" tutorial in stand-alone program

hustnzj發表於2022-09-15

Entering info mode

Execute an info command such as info diff

Basic concepts

  1. An info document consists of some nodes and subnodes. A node contains a single topic.
  2. Header is the first line in a node.
  3. The text near the bottom right corner of the screen:
    • --All---- means the entire text you are looking at fits on the screen.
    • --Top---- means that there is more text below that does not fit.
    • --<percentage>---- means that the percentage position in this node.
    • --Bot---- means that this is the bottom of the node.

Listing commands

  1. Displays a brief list of commands, type ?.
  2. Return from list of commands to help node, type C-x 0 that is–press and hold <CTRL>, type an x, then release <CTRL> and x, and press 0(zero).

Reading primer

Display a primer for first-timers, type h.

Commands for moving in the present node

  1. Move to the beginning of the node you are on, type b.
  2. Move (one viewport - two lines) down, type <SPC>(space).
  3. Move (one viewport - two lines) up, type <DEL> or <BACKSPACE>.

Commands for moving between nodes in a linear sequence

  1. Move to next node at the same level, type n.
  2. Move to next node regardless of level, type ].
  3. Move to previous node at the same level, type p.
  4. Move to previous node regardless of level, type [.
  5. At the end of one node, type <SPC>(space).
  6. At the beginning of one node, type <DEL> or <BACKSPACE>.

Note: n and p will risk skipping some subnodes.

Commands for moving between nodes in a branching structure

Menu mode

  1. You can only use the mode if there is menu on the present node. An menu example:
* Menu:

* Foo:  Help-FOO.       A node you can visit for fun.
* Bar:  Help-FOO.       We have made two ways to get to the same place.
* Help-FOO::            And yet another!
  1. enter the mode:
    1. Type m. Then you can type the subtopic name.
    2. Type <TAB> to move to next topic line. Type <option>-<TAB> to move to the first topic line.
  2. Exit the mode: type C-g.

Commands for moving to some specified node

Cross reference

In Info documentation, you will see many “cross references”. Cross
references look like this: *Note Cross: Help-Cross.

  1. Type f to enter the cross reference mode, then type the cross reference name.
  2. Type l to return to the node where the cross reference was.
  3. Type f? that is–press f and press ?–to get a list of the cross references in this node such as:
    3 completions:
    Cross                   Emacs Info Variables    Overview of Texinfo

Some intermediate Info commands

i command

Normally, you can get to the index from the main menu of the file with the m
command; then you can use the m command again in the index node to go
to the node that describes the topic you want.
i command searches the index for a given topic (a string) and goes
to the node which is listed in the index for that topic.

l command

Revisit nodes in the history list; each successive l command moves one step back through the history.
Note the difference between l and p: l moves to where you
last were, whereas p always moves to the node which the header says
is the Previous node.

d command

The d command gets you instantly to the Directory node which gives a menu of major topics.

t command

The t command moves to the Top node of the manual. This is useful if you want to browse the manual’s main menu, or select some specific top-level menu item.

Quitting info

Type q

To do

  • Advanced info commands
本作品採用《CC 協議》,轉載必須註明作者和本文連結
日拱一卒

相關文章