home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / prgramer / unix / doc / lesskey.man < prev    next >
Text File  |  1993-06-14  |  6KB  |  199 lines

  1.  
  2.  
  3.  
  4. LESSKEY(1)                                             LESSKEY(1)
  5.  
  6.  
  7. NAME
  8.        lesskey - specify key bindings for less
  9.  
  10. SYNOPSIS
  11.        lesskey [-o output] [input]
  12.  
  13. DESCRIPTION
  14.        Lesskey  is  used  to  specify a set of key bindings to be
  15.        used by less.   The  input  file  is  a  text  file  which
  16.        describes  the  key  bindings,  and  the  output file is a
  17.        binary file which is used by less.  If no  input  file  is
  18.        specified,  standard  input is used.  If no output file is
  19.        specified, $HOME/.less is used.
  20.  
  21.        The input file consists of lines of the form:
  22.  
  23.             string <whitespace> action [extra-string] <newline>
  24.  
  25.        Whitespace is any sequence of one or  more  spaces  and/or
  26.        tabs.  The "string" is the command key(s) which invoke the
  27.        action.  The string may be a  single  command  key,  or  a
  28.        sequence  of  up  to 15 keys.  The "action" is the name of
  29.        the less action, from the list below.  The  characters  in
  30.        the  "string"  may  appear  literally, or be prefixed by a
  31.        carat to indicate a control key.  A backslash may be  used
  32.        to  cause  the  following character to be taken literally.
  33.        Characters which must be  preceded  by  backslash  include
  34.        carat,  space,  tab and the backslash itself.  A backslash
  35.        followed by one to three octal digits may be used to spec-
  36.        ify a character by its octal value.  Blank lines and lines
  37.        which start with a pound sign (#) are ignored.
  38.  
  39.        An action may be followed by an extra string.  This string
  40.        is parsed after the command is entered, just as if it were
  41.        entered on the command line.  This feature can be used  in
  42.        certain  cases  to  extend the functionality of a command.
  43.        For example, these entries would create a pair of commands
  44.        to turn on/off line numbers using vi syntax:
  45.  
  46.             :set\ nu       toggle-option -N
  47.             :set\ nonu     toggle-option +N
  48.  
  49.        See also the ":ta" command in the example below.
  50.  
  51.  
  52. EXAMPLE
  53.        The following input file describes the set of default com-
  54.        mand keys used by less:
  55.  
  56.             r         forw-line
  57.             n         forw-line
  58.             e         forw-line
  59.             j         forw-line
  60.             ^E        forw-line
  61.  
  62.  
  63.  
  64.                                                                 1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. LESSKEY(1)                                             LESSKEY(1)
  71.  
  72.  
  73.             ^N        forw-line
  74.             k         back-line
  75.             y         back-line
  76.             ^Y        back-line
  77.             ^K        back-line
  78.             ^P        back-line
  79.             J         forw-line-force
  80.             K         back-line-force
  81.             Y         back-line-force
  82.             d         forw-scroll
  83.             ^D        forw-scroll
  84.             u         back-scroll
  85.             ^U        back-scroll
  86.             '         back-scroll
  87.             \40       forw-screen
  88.             f         forw-screen
  89.             ^F        forw-screen
  90.             ^V        forw-screen
  91.             b         back-screen
  92.             ^B        back-screen
  93.             \33v      back-screen
  94.             z         forw-window
  95.             w         back-window
  96.             F         forw-forever
  97.             R         repaint-flush
  98.             r         repaint
  99.             ^R        repaint
  100.             ^L        repaint
  101.             g         goto-line
  102.             <         goto-line
  103.             \33<      goto-line
  104.             p         percent
  105.             %         percent
  106.             {         forw-bracket {}
  107.             }         back-bracket {}
  108.             (         forw-bracket ()
  109.             )         back-bracket ()
  110.             [         forw-bracket []
  111.             ]         back-bracket []
  112.             \33^F     forw-bracket
  113.             \33^B     back-bracket
  114.             G         goto-end
  115.             \33>      goto-end
  116.             >         goto-end
  117.             P         goto-end
  118.             =         status
  119.             ^G        status
  120.             :f        status
  121.             /         forw-search
  122.             ?         back-search
  123.             \33/      forw-search *
  124.             \33?      back-search *
  125.             n         repeat-search
  126.             \33n      repeat-search-all
  127.  
  128.  
  129.  
  130.                                                                 2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. LESSKEY(1)                                             LESSKEY(1)
  137.  
  138.  
  139.             N         reverse-search
  140.             \33N      reverse-search-all
  141.             m         set-mark
  142.             '         goto-mark
  143.             ^X^X      goto-mark
  144.             E         examine
  145.             :e        examine
  146.             ^X^V      examine
  147.             :n        next-file
  148.             :p        prev-file
  149.             :x        index-file
  150.             -         toggle-option
  151.             :t        toggle-option t
  152.             s         toggle-option o
  153.             _         display-option
  154.             |         pipe
  155.             v         visual
  156.             !         shell
  157.             +         firstcmd
  158.             H         help
  159.             h         help
  160.             V         version
  161.             q         quit
  162.             :q        quit
  163.             :Q        quit
  164.             ZZ        quit
  165.             \33\33    quit
  166.  
  167.        Commands specified by lesskey  take  precedence  over  the
  168.        default  commands.   A default command key may be disabled
  169.        by including it in the key file with the action "invalid".
  170.  
  171.  
  172. SEE ALSO
  173.        less(1)
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.                                                                 3
  197.  
  198.  
  199.