home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / less3292.zip / lesskey.man < prev    next >
Text File  |  1996-10-16  |  11KB  |  397 lines

  1.  
  2.  
  3.  
  4. LESSKEY(1)               USER COMMANDS                 LESSKEY(1)
  5.  
  6.  
  7.  
  8. NAME
  9.      lesskey - specify key bindings for less
  10.  
  11. SYNOPSIS
  12.      lesskey [-o output] [input]
  13.      lesskey -V
  14.  
  15. DESCRIPTION
  16.      _L_e_s_s_k_e_y is used to specify a set of key bindings to be  used
  17.      by  _l_e_s_s.  The input file is a text file which describes the
  18.      key bindings, If the input file is "-",  standard  input  is
  19.      read.  If no input file is specified, a standard filename is
  20.      used as the name of the input file,  which  depends  on  the
  21.      system  being used: On Unix systems, $HOME/.lesskey is used;
  22.      on MS-DOS systems, $HOME/_lesskey is used; and on OS/2  sys-
  23.      tems  $HOME/lesskey.ini  is  used,  or  $INIT/lesskey.ini if
  24.      $HOME is undefined.  The output file is a binary file  which
  25.      is  used  by  _l_e_s_s.  If no output file is specified, and the
  26.      environment variable LESSKEY is set, the value of LESSKEY is
  27.      used  as the name of the output file.  Otherwise, a standard
  28.      filename is used as the  name  of  the  output  file,  which
  29.      depends  on the system being used: On Unix and OS-9 systems,
  30.      $HOME/.less is used; on MS-DOS systems, $HOME/_less is used;
  31.      and   on   OS/2   systems,   $HOME/less.ini   is   used,  or
  32.      $INIT/less.ini if $HOME is undefined.  If  the  output  file
  33.      already exists, _l_e_s_s_k_e_y will overwrite it.
  34.  
  35.      The -V option causes _l_e_s_s_k_e_y to print its version number and
  36.      immediately  exit. If -V is present, other options and argu-
  37.      ments are ignored.
  38.  
  39.      The input file consists of one or more _s_e_c_t_i_o_n_s.  Each  sec-
  40.      tion starts with a line that identifies the type of section.
  41.      Possible sections are:
  42.  
  43.      #command
  44.           Defines new command keys.
  45.  
  46.      #line-edit
  47.           Defines new line-editing keys.
  48.  
  49.      #env Defines environment variables.
  50.  
  51.      Blank lines and lines which start with a pound sign (#)  are
  52.      ignored, except for the special section header lines.
  53.  
  54.  
  55. COMMAND SECTION
  56.      The command section begins with the line
  57.  
  58.      #command
  59.  
  60.  
  61.  
  62.  
  63.                     Last change: Version 329: 16 Oct 96              1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. LESSKEY(1)               USER COMMANDS                 LESSKEY(1)
  71.  
  72.  
  73.  
  74.      If the command section is the first  section  in  the  file,
  75.      this  line  may be omitted.  The command section consists of
  76.      lines of the form:
  77.  
  78.           _s_t_r_i_n_g <whitespace> _a_c_t_i_o_n [extra-string] <newline>
  79.  
  80.      Whitespace is any sequence of  one  or  more  spaces  and/or
  81.      tabs.   The  _s_t_r_i_n_g  is  the command key(s) which invoke the
  82.      action.  The _s_t_r_i_n_g may  be  a  single  command  key,  or  a
  83.      sequence  of  up  to 15 keys.  The _a_c_t_i_o_n is the name of the
  84.      less action, from the list below.   The  characters  in  the
  85.      _s_t_r_i_n_g  may  appear  literally, or be prefixed by a caret to
  86.      indicate a control key.  A  backslash  followed  by  one  to
  87.      three octal digits may be used to specify a character by its
  88.      octal value.  A backslash followed by b, e, n, r or t speci-
  89.      fies  BACKSPACE,  ESCAPE,  NEWLINE,  RETURN  or TAB, respec-
  90.      tively.  A backslash followed by any other  character  indi-
  91.      cates  that  character is to be taken literally.  Characters
  92.      which must be preceded by backslash  include  caret,  space,
  93.      tab and the backslash itself.
  94.  
  95.      An action may be followed by an "extra" string.  When such a
  96.      command  is  entered  while running _l_e_s_s, the action is per-
  97.      formed, and then the extra string is parsed, just as  if  it
  98.      were  typed  in to _l_e_s_s. This feature can be used in certain
  99.      cases to extend the functionality of a command.   For  exam-
  100.      ple,  see  the  "{"  and ":t" commands in the example below.
  101.      The extra string  has  a  special  meaning  for  the  "quit"
  102.      action: when _l_e_s_s quits, first character of the extra string
  103.      is used as its exit status.
  104.  
  105.  
  106. EXAMPLE
  107.      The following input file describes the set of  default  com-
  108.      mand keys used by less:
  109.  
  110.           #command
  111.           \r        forw-line
  112.           \n        forw-line
  113.           e         forw-line
  114.           j         forw-line
  115.           ^E        forw-line
  116.           ^N        forw-line
  117.           k         back-line
  118.           y         back-line
  119.           ^Y        back-line
  120.           ^K        back-line
  121.           ^P        back-line
  122.           J         forw-line-force
  123.           K         back-line-force
  124.           Y         back-line-force
  125.           d         forw-scroll
  126.  
  127.  
  128.  
  129.                     Last change: Version 329: 16 Oct 96              2
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. LESSKEY(1)               USER COMMANDS                 LESSKEY(1)
  137.  
  138.  
  139.  
  140.           ^D        forw-scroll
  141.           u         back-scroll
  142.           ^U        back-scroll
  143.           \40       forw-screen
  144.           f         forw-screen
  145.           ^F        forw-screen
  146.           ^V        forw-screen
  147.           b         back-screen
  148.           ^B        back-screen
  149.           \ev       back-screen
  150.           \e\40          forw-screen-force
  151.           z         forw-window
  152.           w         back-window
  153.           F         forw-forever
  154.           \e[       left-scroll
  155.           \e]       right-scroll
  156.           R         repaint-flush
  157.           r         repaint
  158.           ^R        repaint
  159.           ^L        repaint
  160.           g         goto-line
  161.           <         goto-line
  162.           \e<       goto-line
  163.           p         percent
  164.           %         percent
  165.           {         forw-bracket {}
  166.           }         back-bracket {}
  167.           (         forw-bracket ()
  168.           )         back-bracket ()
  169.           [         forw-bracket []
  170.           ]         back-bracket []
  171.           \e^F      forw-bracket
  172.           \e^B      back-bracket
  173.           G         goto-end
  174.           \e>       goto-end
  175.           >         goto-end
  176.           =         status
  177.           ^G        status
  178.           :f        status
  179.           /         forw-search
  180.           ?         back-search
  181.           \e/       forw-search *
  182.           \e?       back-search *
  183.           n         repeat-search
  184.           \en       repeat-search-all
  185.           N         reverse-search
  186.           \eN       reverse-search-all
  187.           \eu       undo-hilite
  188.           m         set-mark
  189.           '         goto-mark
  190.           ^X^X      goto-mark
  191.           E         examine
  192.  
  193.  
  194.  
  195.                     Last change: Version 329: 16 Oct 96              3
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. LESSKEY(1)               USER COMMANDS                 LESSKEY(1)
  203.  
  204.  
  205.  
  206.           :e        examine
  207.           ^X^V      examine
  208.           :n        next-file
  209.           :p        prev-file
  210.           :x        index-file
  211.           -         toggle-option
  212.           :t        toggle-option t
  213.           s         toggle-option o
  214.           _         display-option
  215.           |         pipe
  216.           v         visual
  217.           !         shell
  218.           +         firstcmd
  219.           H         help
  220.           h         help
  221.           V         version
  222.           q         quit
  223.           :q        quit
  224.           :Q        quit
  225.           ZZ        quit
  226.  
  227.  
  228. PRECEDENCE
  229.      Commands specified  by  _l_e_s_s_k_e_y  take  precedence  over  the
  230.      default  commands.  A default command key may be disabled by
  231.      including it in the input file with  the  action  "invalid".
  232.      Alternatively,  a  key may be defined to do nothing by using
  233.      the action "noaction".  "noaction" is similar to  "invalid",
  234.      but  _l_e_s_s  will give an error beep for an "invalid" command,
  235.      but not for a "noaction" command.  In addition, ALL  default
  236.      commands  may be disabled by adding this control line to the
  237.      input file:
  238.  
  239.      #stop
  240.  
  241.      This will cause all default commands  to  be  ignored.   The
  242.      #stop  line  should  be the last line in that section of the
  243.      file.
  244.  
  245.      Be aware that #stop can be dangerous. Since all default com-
  246.      mands  are  disabled,  you  must provide sufficient commands
  247.      before the #stop line to enable all necessary actions.   For
  248.      example,  failure  to  provide  a "quit" command can lead to
  249.      frustration.
  250.  
  251.  
  252. LINE EDITING SECTION
  253.      The line-editing section begins with the line:
  254.  
  255.      #line-edit
  256.  
  257.      This section specifies new key bindings for the line editing
  258.  
  259.  
  260.  
  261.                     Last change: Version 329: 16 Oct 96              4
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. LESSKEY(1)               USER COMMANDS                 LESSKEY(1)
  269.  
  270.  
  271.  
  272.      commands,  in  a  manner similar to the way key bindings for
  273.      ordinary commands are specified  in  the  #command  section.
  274.      The  line-editing  section  consists  of  a list of keys and
  275.      actions, one per line as in the example below.
  276.  
  277.  
  278. EXAMPLE
  279.      The following input file describes the set of default  line-
  280.      editing keys used by less:
  281.  
  282.           #line-edit
  283.           \t        forw-complete
  284.           \17       back-complete
  285.           \e\t      back-complete
  286.           \14       expand
  287.           ^V        literal
  288.           ^A        literal
  289.           \el       right
  290.           \eh       left
  291.           \eb       word-left
  292.           \ew       word-right
  293.           \ei       insert
  294.           \ex       delete
  295.           \e\b      word-backspace
  296.           \e0       home
  297.           \e$       end
  298.           \ek       up
  299.           \ej       down
  300.  
  301.  
  302.  
  303. LESS ENVIRONMENT VARIABLES
  304.      The environment variable section begins with the line
  305.  
  306.      #env
  307.  
  308.      Following this  line  is  a  list  of  environment  variable
  309.      assignments.   Each line consists of an environment variable
  310.      name, an equals sign (=) and the value to be assigned to the
  311.      environment  variable.   White  space  before  and after the
  312.      equals sign is ignored.  Variables assigned in this way  are
  313.      visible only to _l_e_s_s. If a variable is specified in the sys-
  314.      tem environment and also in a lesskey file, the value in the
  315.      lesskey  file  takes  precedence.  Although the lesskey file
  316.      can be used to override variables set  in  the  environment,
  317.      the  main purpose of assigning variables in the lesskey file
  318.      is simply to have all _l_e_s_s configuration information  stored
  319.      in one file.
  320.  
  321.  
  322. EXAMPLE
  323.      The following input file sets the -i option whenever _l_e_s_s is
  324.  
  325.  
  326.  
  327.                     Last change: Version 329: 16 Oct 96              5
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. LESSKEY(1)               USER COMMANDS                 LESSKEY(1)
  335.  
  336.  
  337.  
  338.      run, and specifies the character set to be "latin1":
  339.  
  340.           #env
  341.           LESS = -i
  342.           LESSCHARSET = latin1
  343.  
  344.  
  345.  
  346. SEE ALSO
  347.      less(1)
  348.  
  349.  
  350. WARNINGS
  351.      It is not possible to specify special keys, such as uparrow,
  352.      in  a  keyboard-independent manner.  The only way to specify
  353.      such keys is to specify the escape sequence which a particu-
  354.      lar keyboard sends when such a keys is pressed.
  355.  
  356.      On MS-DOS and OS/2 systems, certain keys send a sequence  of
  357.      characters  which  start with a NUL character (0).  This NUL
  358.      character should be represented as \340 in a lesskey file.
  359.  
  360.  
  361. COPYRIGHT
  362.      Copyright (c) 1984,1985,1989,1994,1995  Mark Nudelman
  363.      Comments to: lessmail@aol.com
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.                     Last change: Version 329: 16 Oct 96              6
  394.  
  395.  
  396.  
  397.