home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / less2912.zip / lesskey.man < prev    next >
Text File  |  1995-11-09  |  11KB  |  331 lines

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