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