home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / less-321-src.tgz / tar.out / fsf / less / lesskey.man < prev    next >
Text File  |  1996-09-28  |  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 321: 18 Jul 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.  
  102.  
  103. EXAMPLE
  104.      The following input file describes the set of  default  com-
  105.      mand keys used by less:
  106.  
  107.           #command
  108.           \r        forw-line
  109.           \n        forw-line
  110.           e         forw-line
  111.           j         forw-line
  112.           ^E        forw-line
  113.           ^N        forw-line
  114.           k         back-line
  115.           y         back-line
  116.           ^Y        back-line
  117.           ^K        back-line
  118.           ^P        back-line
  119.           J         forw-line-force
  120.           K         back-line-force
  121.           Y         back-line-force
  122.           d         forw-scroll
  123.           ^D        forw-scroll
  124.           u         back-scroll
  125.           ^U        back-scroll
  126.  
  127.  
  128.  
  129.                     Last change: Version 321: 18 Jul 96              2
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. LESSKEY(1)               USER COMMANDS                 LESSKEY(1)
  137.  
  138.  
  139.  
  140.           \40       forw-screen
  141.           f         forw-screen
  142.           ^F        forw-screen
  143.           ^V        forw-screen
  144.           b         back-screen
  145.           ^B        back-screen
  146.           \ev       back-screen
  147.           \e\40          forw-screen-force
  148.           z         forw-window
  149.           w         back-window
  150.           F         forw-forever
  151.           \e[       left-scroll
  152.           \e]       right-scroll
  153.           R         repaint-flush
  154.           r         repaint
  155.           ^R        repaint
  156.           ^L        repaint
  157.           g         goto-line
  158.           <         goto-line
  159.           \e<       goto-line
  160.           p         percent
  161.           %         percent
  162.           {         forw-bracket {}
  163.           }         back-bracket {}
  164.           (         forw-bracket ()
  165.           )         back-bracket ()
  166.           [         forw-bracket []
  167.           ]         back-bracket []
  168.           \e^F      forw-bracket
  169.           \e^B      back-bracket
  170.           G         goto-end
  171.           \e>       goto-end
  172.           >         goto-end
  173.           =         status
  174.           ^G        status
  175.           :f        status
  176.           /         forw-search
  177.           ?         back-search
  178.           \e/       forw-search *
  179.           \e?       back-search *
  180.           n         repeat-search
  181.           \en       repeat-search-all
  182.           N         reverse-search
  183.           \eN       reverse-search-all
  184.           \eu       undo-hilite
  185.           m         set-mark
  186.           '         goto-mark
  187.           ^X^X      goto-mark
  188.           E         examine
  189.           :e        examine
  190.           ^X^V      examine
  191.           :n        next-file
  192.  
  193.  
  194.  
  195.                     Last change: Version 321: 18 Jul 96              3
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. LESSKEY(1)               USER COMMANDS                 LESSKEY(1)
  203.  
  204.  
  205.  
  206.           :p        prev-file
  207.           :x        index-file
  208.           -         toggle-option
  209.           :t        toggle-option t
  210.           s         toggle-option o
  211.           _         display-option
  212.           |         pipe
  213.           v         visual
  214.           !         shell
  215.           +         firstcmd
  216.           H         help
  217.           h         help
  218.           V         version
  219.           q         quit
  220.           :q        quit
  221.           :Q        quit
  222.           ZZ        quit
  223.  
  224.  
  225. PRECEDENCE
  226.      Commands specified  by  _l_e_s_s_k_e_y  take  precedence  over  the
  227.      default  commands.  A default command key may be disabled by
  228.      including it in the input file with  the  action  "invalid".
  229.      Alternatively,  a  key may be defined to do nothing by using
  230.      the action "noaction".  "noaction" is similar to  "invalid",
  231.      but  _l_e_s_s  will give an error beep for an "invalid" command,
  232.      but not for a "noaction" command.  In addition, ALL  default
  233.      commands  may be disabled by adding this control line to the
  234.      input file:
  235.  
  236.      #stop
  237.  
  238.      This will cause all default commands  to  be  ignored.   The
  239.      #stop  line  should  be the last line in that section of the
  240.      file.
  241.  
  242.      Be aware that #stop can be dangerous. Since all default com-
  243.      mands  are  disabled,  you  must provide sufficient commands
  244.      before the #stop line to enable all necessary actions.   For
  245.      example,  failure  to  provide  a "quit" command can lead to
  246.      frustration.
  247.  
  248.  
  249. LINE EDITING SECTION
  250.      The line-editing section begins with the line:
  251.  
  252.      #line-edit
  253.  
  254.      This section specifies new key bindings for the line editing
  255.      commands,  in  a  manner similar to the way key bindings for
  256.      ordinary commands are specified  in  the  #command  section.
  257.      The  line-editing  section  consists  of  a list of keys and
  258.  
  259.  
  260.  
  261.                     Last change: Version 321: 18 Jul 96              4
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. LESSKEY(1)               USER COMMANDS                 LESSKEY(1)
  269.  
  270.  
  271.  
  272.      actions, one per line as in the example below.
  273.  
  274.  
  275. EXAMPLE
  276.      The following input file describes the set of default  line-
  277.      editing keys used by less:
  278.  
  279.           #line-edit
  280.           \t        forw-complete
  281.           \17       back-complete
  282.           \e\t      back-complete
  283.           \14       expand
  284.           ^V        literal
  285.           ^A        literal
  286.           \el       right
  287.           \eh       left
  288.           \eb       word-left
  289.           \ew       word-right
  290.           \ei       insert
  291.           \ex       delete
  292.           \e\b      word-backspace
  293.           \e0       home
  294.           \e$       end
  295.           \ek       up
  296.           \ej       down
  297.  
  298.  
  299.  
  300. LESS ENVIRONMENT VARIABLES
  301.      The environment variable section begins with the line
  302.  
  303.      #env
  304.  
  305.      Following this  line  is  a  list  of  environment  variable
  306.      assignments.   Each line consists of an environment variable
  307.      name, an equals sign (=) and the value to be assigned to the
  308.      environment  variable.   White  space  before  and after the
  309.      equals sign is ignored.  Variables assigned in this way  are
  310.      visible only to _l_e_s_s. If a variable is specified in the sys-
  311.      tem environment and also in a lesskey file, the value in the
  312.      lesskey  file  takes  precedence.  Although the lesskey file
  313.      can be used to override variables set  in  the  environment,
  314.      the  main purpose of assigning variables in the lesskey file
  315.      is simply to have all _l_e_s_s configuration information  stored
  316.      in one file.
  317.  
  318.  
  319. EXAMPLE
  320.      The following input file sets the -i option whenever _l_e_s_s is
  321.      run, and specifies the character set to be "latin1":
  322.  
  323.           #env
  324.  
  325.  
  326.  
  327.                     Last change: Version 321: 18 Jul 96              5
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. LESSKEY(1)               USER COMMANDS                 LESSKEY(1)
  335.  
  336.  
  337.  
  338.           LESS = -i
  339.           LESSCHARSET = latin1
  340.  
  341.  
  342.  
  343. SEE ALSO
  344.      less(1)
  345.  
  346.  
  347. WARNINGS
  348.      It is not possible to specify special keys, such as uparrow,
  349.      in  a  keyboard-independent manner.  The only way to specify
  350.      such keys is to specify the escape sequence which a particu-
  351.      lar keyboard sends when such a keys is pressed.
  352.  
  353.      On MS-DOS and OS/2 systems, certain keys send a sequence  of
  354.      characters  which  start with a NUL character (0).  This NUL
  355.      character should be represented as \340 in a lesskey file.
  356.  
  357.  
  358. COPYRIGHT
  359.      Copyright (c) 1984,1985,1989,1994,1995  Mark Nudelman
  360.      Comments to: markn@3do.com
  361.  
  362.  
  363.  
  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 321: 18 Jul 96              6
  394.  
  395.  
  396.  
  397.