]> www.wagner.pp.ru Git - oss/less.git/blob - less.hlp
Removed code page operation. Fix GLOB macros for 64-bit win32. Fixed debug flags...
[oss/less.git] / less.hlp
1
2                    S\bSU\bUM\bMM\bMA\bAR\bRY\bY O\bOF\bF L\bLE\bES\bSS\bS C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS
3
4       Commands marked with * may be preceded by a number, _\bN.
5       Notes in parentheses indicate the behavior if _\bN is given.
6       A key preceded by a caret indicates the Ctrl key; thus ^K is ctrl-K.
7
8   h  H                 Display this help.
9   q  :q  Q  :Q  ZZ     Exit.
10  ---------------------------------------------------------------------------
11
12                            M\bMO\bOV\bVI\bIN\bNG\bG
13
14   e  ^E  j  ^N  CR  *  Forward  one line   (or _\bN lines).
15   y  ^Y  k  ^K  ^P  *  Backward one line   (or _\bN lines).
16   f  ^F  ^V  SPACE  *  Forward  one window (or _\bN lines).
17   b  ^B  ESC-v      *  Backward one window (or _\bN lines).
18   z                 *  Forward  one window (and set window to _\bN).
19   w                 *  Backward one window (and set window to _\bN).
20   ESC-SPACE         *  Forward  one window, but don't stop at end-of-file.
21   d  ^D             *  Forward  one half-window (and set half-window to _\bN).
22   u  ^U             *  Backward one half-window (and set half-window to _\bN).
23   ESC-)  RightArrow *  Left  one half screen width (or _\bN positions).
24   ESC-(  LeftArrow  *  Right one half screen width (or _\bN positions).
25   F                    Forward forever; like "tail -f".
26   ESC-F                Like F but stop when search pattern is found.
27   r  ^R  ^L            Repaint screen.
28   R                    Repaint screen, discarding buffered input.
29         ---------------------------------------------------
30         Default "window" is the screen height.
31         Default "half-window" is half of the screen height.
32  ---------------------------------------------------------------------------
33
34                           S\bSE\bEA\bAR\bRC\bCH\bHI\bIN\bNG\bG
35
36   /_\bp_\ba_\bt_\bt_\be_\br_\bn          *  Search forward for (_\bN-th) matching line.
37   ?_\bp_\ba_\bt_\bt_\be_\br_\bn          *  Search backward for (_\bN-th) matching line.
38   n                 *  Repeat previous search (for _\bN-th occurrence).
39   N                 *  Repeat previous search in reverse direction.
40   ESC-n             *  Repeat previous search, spanning files.
41   ESC-N             *  Repeat previous search, reverse dir. & spanning files.
42   ESC-u                Undo (toggle) search highlighting.
43   &_\bp_\ba_\bt_\bt_\be_\br_\bn          *  Display only matching lines
44         ---------------------------------------------------
45         A search pattern may be preceded by one or more of:
46         ^N or !  Search for NON-matching lines.
47         ^E or *  Search multiple files (pass thru END OF FILE).
48         ^F or @  Start search at FIRST file (for /) or last file (for ?).
49         ^K       Highlight matches, but don't move (KEEP position).
50         ^R       Don't use REGULAR EXPRESSIONS.
51  ---------------------------------------------------------------------------
52
53                            J\bJU\bUM\bMP\bPI\bIN\bNG\bG
54
55   g  <  ESC-<       *  Go to first line in file (or line _\bN).
56   G  >  ESC->       *  Go to last line in file (or line _\bN).
57   p  %              *  Go to beginning of file (or _\bN percent into file).
58   t                 *  Go to the (_\bN-th) next tag.
59   T                 *  Go to the (_\bN-th) previous tag.
60   {  (  [           *  Find close bracket } ) ].
61   }  )  ]           *  Find open bracket { ( [.
62   ESC-^F _\b<_\bc_\b1_\b> _\b<_\bc_\b2_\b>  *  Find close bracket _\b<_\bc_\b2_\b>.
63   ESC-^B _\b<_\bc_\b1_\b> _\b<_\bc_\b2_\b>  *  Find open bracket _\b<_\bc_\b1_\b
64         ---------------------------------------------------
65         Each "find close bracket" command goes forward to the close bracket 
66           matching the (_\bN-th) open bracket in the top line.
67         Each "find open bracket" command goes backward to the open bracket 
68           matching the (_\bN-th) close bracket in the bottom line.
69
70   m_\b<_\bl_\be_\bt_\bt_\be_\br_\b>            Mark the current position with <letter>.
71   '_\b<_\bl_\be_\bt_\bt_\be_\br_\b>            Go to a previously marked position.
72   ''                   Go to the previous position.
73   ^X^X                 Same as '.
74         ---------------------------------------------------
75         A mark is any upper-case or lower-case letter.
76         Certain marks are predefined:
77              ^  means  beginning of the file
78              $  means  end of the file
79  ---------------------------------------------------------------------------
80
81                         C\bCH\bHA\bAN\bNG\bGI\bIN\bNG\bG F\bFI\bIL\bLE\bES\bS
82
83   :e [_\bf_\bi_\bl_\be]            Examine a new file.
84   ^X^V                 Same as :e.
85   :n                *  Examine the (_\bN-th) next file from the command line.
86   :p                *  Examine the (_\bN-th) previous file from the command line.
87   :x                *  Examine the first (or _\bN-th) file from the command line.
88   :d                   Delete the current file from the command line list.
89   =  ^G  :f            Print current file name.
90  ---------------------------------------------------------------------------
91
92                     M\bMI\bIS\bSC\bCE\bEL\bLL\bLA\bAN\bNE\bEO\bOU\bUS\bS C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS
93
94   -_\b<_\bf_\bl_\ba_\bg_\b>              Toggle a command line option [see OPTIONS below].
95   --_\b<_\bn_\ba_\bm_\be_\b>             Toggle a command line option, by name.
96   __\b<_\bf_\bl_\ba_\bg_\b>              Display the setting of a command line option.
97   ___\b<_\bn_\ba_\bm_\be_\b>             Display the setting of an option, by name.
98   +_\bc_\bm_\bd                 Execute the less cmd each time a new file is examined.
99
100   !_\bc_\bo_\bm_\bm_\ba_\bn_\bd             Execute the shell command with $SHELL.
101   |X\bX_\bc_\bo_\bm_\bm_\ba_\bn_\bd            Pipe file between current pos & mark X\bX to shell command.
102   v                    Edit the current file with $VISUAL or $EDITOR.
103   V                    Print version number of "less".
104  ---------------------------------------------------------------------------
105
106                            O\bOP\bPT\bTI\bIO\bON\bNS\bS
107
108         Most options may be changed either on the command line,
109         or from within less by using the - or -- command.
110         Options may be given in one of two forms: either a single
111         character preceded by a -, or a name preceded by --.
112
113   -?  ........  --help
114                   Display help (from command line).
115   -a  ........  --search-skip-screen
116                   Search skips current screen.
117   -A  ........  --SEARCH-SKIP-SCREEN
118                   Search starts just after target line.
119   -b [_\bN]  ....  --buffers=[_\bN]
120                   Number of buffers.
121   -B  ........  --auto-buffers
122                   Don't automatically allocate buffers for pipes.
123   -c  ........  --clear-screen
124                   Repaint by clearing rather than scrolling.
125   -d  ........  --dumb
126                   Dumb terminal.
127   -D [_\bx_\bn_\b._\bn]  .  --color=_\bx_\bn_\b._\bn
128                   Set screen colors. (MS-DOS only)
129   -e  -E  ....  --quit-at-eof  --QUIT-AT-EOF
130                   Quit at end of file.
131   -f  ........  --force
132                   Force open non-regular files.
133   -F  ........  --quit-if-one-screen
134                   Quit if entire file fits on first screen.
135   -g  ........  --hilite-search
136                   Highlight only last match for searches.
137   -G  ........  --HILITE-SEARCH
138                   Don't highlight any matches for searches.
139   -h [_\bN]  ....  --max-back-scroll=[_\bN]
140                   Backward scroll limit.
141   -i  ........  --ignore-case
142                   Ignore case in searches that do not contain uppercase.
143   -I  ........  --IGNORE-CASE
144                   Ignore case in all searches.
145   -j [_\bN]  ....  --jump-target=[_\bN]
146                   Screen position of target lines.
147   -J  ........  --status-column
148                   Display a status column at left edge of screen.
149   -k [_\bf_\bi_\bl_\be]  .  --lesskey-file=[_\bf_\bi_\bl_\be]
150                   Use a lesskey file.
151   -K            --quit-on-intr
152                   Exit less in response to ctrl-C.
153   -L  ........  --no-lessopen
154                   Ignore the LESSOPEN environment variable.
155   -m  -M  ....  --long-prompt  --LONG-PROMPT
156                   Set prompt style.
157   -n  -N  ....  --line-numbers  --LINE-NUMBERS
158                   Don't use line numbers.
159   -o [_\bf_\bi_\bl_\be]  .  --log-file=[_\bf_\bi_\bl_\be]
160                   Copy to log file (standard input only).
161   -O [_\bf_\bi_\bl_\be]  .  --LOG-FILE=[_\bf_\bi_\bl_\be]
162                   Copy to log file (unconditionally overwrite).
163   -p [_\bp_\ba_\bt_\bt_\be_\br_\bn]  --pattern=[_\bp_\ba_\bt_\bt_\be_\br_\bn]
164                   Start at pattern (from command line).
165   -P [_\bp_\br_\bo_\bm_\bp_\bt]   --prompt=[_\bp_\br_\bo_\bm_\bp_\bt]
166                   Define new prompt.
167   -q  -Q  ....  --quiet  --QUIET  --silent --SILENT
168                   Quiet the terminal bell.
169   -r  -R  ....  --raw-control-chars  --RAW-CONTROL-CHARS
170                   Output "raw" control characters.
171   -s  ........  --squeeze-blank-lines
172                   Squeeze multiple blank lines.
173   -S  ........  --chop-long-lines
174                   Chop (truncate) long lines rather than wrapping.
175   -t [_\bt_\ba_\bg]  ..  --tag=[_\bt_\ba_\bg]
176                   Find a tag.
177   -T [_\bt_\ba_\bg_\bs_\bf_\bi_\bl_\be] --tag-file=[_\bt_\ba_\bg_\bs_\bf_\bi_\bl_\be]
178                   Use an alternate tags file.
179   -u  -U  ....  --underline-special  --UNDERLINE-SPECIAL
180                   Change handling of backspaces.
181   -V  ........  --version
182                   Display the version number of "less".
183   -w  ........  --hilite-unread
184                   Highlight first new line after forward-screen.
185   -W  ........  --HILITE-UNREAD
186                   Highlight first new line after any forward movement.
187   -x [_\bN[,...]]  --tabs=[_\bN[,...]]
188                   Set tab stops.
189   -X  ........  --no-init
190                   Don't use termcap init/deinit strings.
191   -y [_\bN]  ....  --max-forw-scroll=[_\bN]
192                   Forward scroll limit.
193   -z [_\bN]  ....  --window=[_\bN]
194                   Set size of window.
195   -" [_\bc[_\bc]]  .  --quotes=[_\bc[_\bc]]
196                   Set shell quote characters.
197   -~  ........  --tilde
198                   Don't display tildes after end of file.
199   -# [_\bN]  ....  --shift=[_\bN]
200                   Horizontal scroll amount (0 = one half screen width)
201       ........  --no-keypad
202                   Don't send termcap keypad init/deinit strings.
203       ........  --follow-name
204                   The F command changes files if the input file is renamed.
205       ........  --use-backslash
206                   Subsequent options use backslash as escape char.
207
208
209  ---------------------------------------------------------------------------
210
211                           L\bLI\bIN\bNE\bE E\bED\bDI\bIT\bTI\bIN\bNG\bG
212
213         These keys can be used to edit text being entered 
214         on the "command line" at the bottom of the screen.
215
216  RightArrow ..................... ESC-l ... Move cursor right one character.
217  LeftArrow ...................... ESC-h ... Move cursor left one character.
218  ctrl-RightArrow  ESC-RightArrow  ESC-w ... Move cursor right one word.
219  ctrl-LeftArrow   ESC-LeftArrow   ESC-b ... Move cursor left one word.
220  HOME ........................... ESC-0 ... Move cursor to start of line.
221  END ............................ ESC-$ ... Move cursor to end of line.
222  BACKSPACE ................................ Delete char to left of cursor.
223  DELETE ......................... ESC-x ... Delete char under cursor.
224  ctrl-BACKSPACE   ESC-BACKSPACE ........... Delete word to left of cursor.
225  ctrl-DELETE .... ESC-DELETE .... ESC-X ... Delete word under cursor.
226  ctrl-U ......... ESC (MS-DOS only) ....... Delete entire line.
227  UpArrow ........................ ESC-k ... Retrieve previous command line.
228  DownArrow ...................... ESC-j ... Retrieve next command line.
229  TAB ...................................... Complete filename & cycle.
230  SHIFT-TAB ...................... ESC-TAB   Complete filename & reverse cycle.
231  ctrl-L ................................... Complete filename, list all.
232
233