less.hlp revision 191930
160786Sps 260786Sps SSUUMMMMAARRYY OOFF LLEESSSS CCOOMMMMAANNDDSS 360786Sps 460786Sps Commands marked with * may be preceded by a number, _N. 560786Sps Notes in parentheses indicate the behavior if _N is given. 660786Sps 760786Sps h H Display this help. 860786Sps q :q Q :Q ZZ Exit. 960786Sps --------------------------------------------------------------------------- 1060786Sps 1160786Sps MMOOVVIINNGG 1260786Sps 1360786Sps e ^E j ^N CR * Forward one line (or _N lines). 1460786Sps y ^Y k ^K ^P * Backward one line (or _N lines). 1560786Sps f ^F ^V SPACE * Forward one window (or _N lines). 1660786Sps b ^B ESC-v * Backward one window (or _N lines). 1760786Sps z * Forward one window (and set window to _N). 1860786Sps w * Backward one window (and set window to _N). 1960786Sps ESC-SPACE * Forward one window, but don't stop at end-of-file. 2060786Sps d ^D * Forward one half-window (and set half-window to _N). 2160786Sps u ^U * Backward one half-window (and set half-window to _N). 22128345Stjr ESC-) RightArrow * Left one half screen width (or _N positions). 23128345Stjr ESC-( LeftArrow * Right one half screen width (or _N positions). 2460786Sps F Forward forever; like "tail -f". 2560786Sps r ^R ^L Repaint screen. 2660786Sps R Repaint screen, discarding buffered input. 2760786Sps --------------------------------------------------- 2860786Sps Default "window" is the screen height. 2960786Sps Default "half-window" is half of the screen height. 3060786Sps --------------------------------------------------------------------------- 3160786Sps 3260786Sps SSEEAARRCCHHIINNGG 3360786Sps 3460786Sps /_p_a_t_t_e_r_n * Search forward for (_N-th) matching line. 3560786Sps ?_p_a_t_t_e_r_n * Search backward for (_N-th) matching line. 3660786Sps n * Repeat previous search (for _N-th occurrence). 3760786Sps N * Repeat previous search in reverse direction. 3860786Sps ESC-n * Repeat previous search, spanning files. 3960786Sps ESC-N * Repeat previous search, reverse dir. & spanning files. 4060786Sps ESC-u Undo (toggle) search highlighting. 41191930Sdelphij &_p_a_t_t_e_r_n * Display only matching lines 4260786Sps --------------------------------------------------- 4360786Sps Search patterns may be modified by one or more of: 4460786Sps ^N or ! Search for NON-matching lines. 4560786Sps ^E or * Search multiple files (pass thru END OF FILE). 4660786Sps ^F or @ Start search at FIRST file (for /) or last file (for ?). 4760786Sps ^K Highlight matches, but don't move (KEEP position). 4860786Sps ^R Don't use REGULAR EXPRESSIONS. 4960786Sps --------------------------------------------------------------------------- 5060786Sps 5160786Sps JJUUMMPPIINNGG 5260786Sps 5360786Sps g < ESC-< * Go to first line in file (or line _N). 5460786Sps G > ESC-> * Go to last line in file (or line _N). 5560786Sps p % * Go to beginning of file (or _N percent into file). 5689019Sps t * Go to the (_N-th) next tag. 5789019Sps T * Go to the (_N-th) previous tag. 5860786Sps { ( [ * Find close bracket } ) ]. 5960786Sps } ) ] * Find open bracket { ( [. 6060786Sps ESC-^F _<_c_1_> _<_c_2_> * Find close bracket _<_c_2_>. 6160786Sps ESC-^B _<_c_1_> _<_c_2_> * Find open bracket _<_c_1_> 6260786Sps --------------------------------------------------- 6360786Sps Each "find close bracket" command goes forward to the close bracket 6460786Sps matching the (_N-th) open bracket in the top line. 6560786Sps Each "find open bracket" command goes backward to the open bracket 6660786Sps matching the (_N-th) close bracket in the bottom line. 6760786Sps 6860786Sps m_<_l_e_t_t_e_r_> Mark the current position with <letter>. 6960786Sps '_<_l_e_t_t_e_r_> Go to a previously marked position. 7060786Sps '' Go to the previous position. 7160786Sps ^X^X Same as '. 7260786Sps --------------------------------------------------- 7360786Sps A mark is any upper-case or lower-case letter. 7460786Sps Certain marks are predefined: 7560786Sps ^ means beginning of the file 7660786Sps $ means end of the file 7760786Sps --------------------------------------------------------------------------- 7860786Sps 7960786Sps CCHHAANNGGIINNGG FFIILLEESS 8060786Sps 8160786Sps :e [_f_i_l_e] Examine a new file. 8260786Sps ^X^V Same as :e. 8360786Sps :n * Examine the (_N-th) next file from the command line. 8460786Sps :p * Examine the (_N-th) previous file from the command line. 8560786Sps :x * Examine the first (or _N-th) file from the command line. 8660786Sps :d Delete the current file from the command line list. 8760786Sps = ^G :f Print current file name. 8860786Sps --------------------------------------------------------------------------- 8960786Sps 9060786Sps MMIISSCCEELLLLAANNEEOOUUSS CCOOMMMMAANNDDSS 9160786Sps 9260786Sps -_<_f_l_a_g_> Toggle a command line option [see OPTIONS below]. 9360786Sps --_<_n_a_m_e_> Toggle a command line option, by name. 9460786Sps __<_f_l_a_g_> Display the setting of a command line option. 9560786Sps ___<_n_a_m_e_> Display the setting of an option, by name. 9660786Sps +_c_m_d Execute the less cmd each time a new file is examined. 9760786Sps 9860786Sps !_c_o_m_m_a_n_d Execute the shell command with $SHELL. 9960786Sps |XX_c_o_m_m_a_n_d Pipe file between current pos & mark XX to shell command. 10060786Sps v Edit the current file with $VISUAL or $EDITOR. 10160786Sps V Print version number of "less". 10260786Sps --------------------------------------------------------------------------- 10360786Sps 10460786Sps OOPPTTIIOONNSS 10560786Sps 10660786Sps Most options may be changed either on the command line, 10760786Sps or from within less by using the - or -- command. 10860786Sps Options may be given in one of two forms: either a single 10960786Sps character preceded by a -, or a name preceeded by --. 11060786Sps 11160786Sps -? ........ --help 11260786Sps Display help (from command line). 11360786Sps -a ........ --search-skip-screen 11460786Sps Forward search skips current screen. 11560786Sps -b [_N] .... --buffers=[_N] 11660786Sps Number of buffers. 11760786Sps -B ........ --auto-buffers 11860786Sps Don't automatically allocate buffers for pipes. 119170256Sdelphij -c ........ --clear-screen 120170256Sdelphij Repaint by clearing rather than scrolling. 12160786Sps -d ........ --dumb 12260786Sps Dumb terminal. 12360786Sps -D [_x_n_._n] . --color=_x_n_._n 12460786Sps Set screen colors. (MS-DOS only) 12560786Sps -e -E .... --quit-at-eof --QUIT-AT-EOF 12660786Sps Quit at end of file. 12760786Sps -f ........ --force 12860786Sps Force open non-regular files. 12960786Sps -F ........ --quit-if-one-screen 13060786Sps Quit if entire file fits on first screen. 13160786Sps -g ........ --hilite-search 13260786Sps Highlight only last match for searches. 13360786Sps -G ........ --HILITE-SEARCH 13460786Sps Don't highlight any matches for searches. 13560786Sps -h [_N] .... --max-back-scroll=[_N] 13660786Sps Backward scroll limit. 13760786Sps -i ........ --ignore-case 13860786Sps Ignore case in searches that do not contain uppercase. 13960786Sps -I ........ --IGNORE-CASE 14060786Sps Ignore case in all searches. 14160786Sps -j [_N] .... --jump-target=[_N] 14260786Sps Screen position of target lines. 14363128Sps -J ........ --status-column 14463128Sps Display a status column at left edge of screen. 14560786Sps -k [_f_i_l_e] . --lesskey-file=[_f_i_l_e] 14660786Sps Use a lesskey file. 147128345Stjr -L ........ --no-lessopen 148128345Stjr Ignore the LESSOPEN environment variable. 14960786Sps -m -M .... --long-prompt --LONG-PROMPT 15060786Sps Set prompt style. 15160786Sps -n -N .... --line-numbers --LINE-NUMBERS 152170256Sdelphij Don't use line numbers. 15360786Sps -o [_f_i_l_e] . --log-file=[_f_i_l_e] 15460786Sps Copy to log file (standard input only). 15560786Sps -O [_f_i_l_e] . --LOG-FILE=[_f_i_l_e] 15660786Sps Copy to log file (unconditionally overwrite). 15760786Sps -p [_p_a_t_t_e_r_n] --pattern=[_p_a_t_t_e_r_n] 15860786Sps Start at pattern (from command line). 15960786Sps -P [_p_r_o_m_p_t] --prompt=[_p_r_o_m_p_t] 16060786Sps Define new prompt. 16160786Sps -q -Q .... --quiet --QUIET --silent --SILENT 16260786Sps Quiet the terminal bell. 16360786Sps -r -R .... --raw-control-chars --RAW-CONTROL-CHARS 16460786Sps Output "raw" control characters. 16560786Sps -s ........ --squeeze-blank-lines 16660786Sps Squeeze multiple blank lines. 16760786Sps -S ........ --chop-long-lines 16860786Sps Chop long lines. 16960786Sps -t [_t_a_g] .. --tag=[_t_a_g] 17060786Sps Find a tag. 17160786Sps -T [_t_a_g_s_f_i_l_e] --tag-file=[_t_a_g_s_f_i_l_e] 17260786Sps Use an alternate tags file. 17360786Sps -u -U .... --underline-special --UNDERLINE-SPECIAL 17460786Sps Change handling of backspaces. 17560786Sps -V ........ --version 17660786Sps Display the version number of "less". 17760786Sps -w ........ --hilite-unread 17860786Sps Highlight first new line after forward-screen. 17960786Sps -W ........ --HILITE-UNREAD 18060786Sps Highlight first new line after any forward movement. 18189019Sps -x [_N[,...]] --tabs=[_N[,...]] 18260786Sps Set tab stops. 18360786Sps -X ........ --no-init 18460786Sps Don't use termcap init/deinit strings. 18589019Sps --no-keypad 18689019Sps Don't use termcap keypad init/deinit strings. 18760786Sps -y [_N] .... --max-forw-scroll=[_N] 18860786Sps Forward scroll limit. 18960786Sps -z [_N] .... --window=[_N] 19060786Sps Set size of window. 19160786Sps -" [_c[_c]] . --quotes=[_c[_c]] 19260786Sps Set shell quote characters. 19360786Sps -~ ........ --tilde 19460786Sps Don't display tildes after end of file. 19563128Sps -# [_N] .... --shift=[_N] 19663128Sps Horizontal scroll amount (0 = one half screen width) 19763128Sps 19860786Sps --------------------------------------------------------------------------- 19960786Sps 20060786Sps LLIINNEE EEDDIITTIINNGG 20160786Sps 20260786Sps These keys can be used to edit text being entered 20360786Sps on the "command line" at the bottom of the screen. 20460786Sps 20560786Sps RightArrow ESC-l Move cursor right one character. 20660786Sps LeftArrow ESC-h Move cursor left one character. 20760786Sps CNTL-RightArrow ESC-RightArrow ESC-w Move cursor right one word. 20860786Sps CNTL-LeftArrow ESC-LeftArrow ESC-b Move cursor left one word. 20960786Sps HOME ESC-0 Move cursor to start of line. 21060786Sps END ESC-$ Move cursor to end of line. 21160786Sps BACKSPACE Delete char to left of cursor. 21260786Sps DELETE ESC-x Delete char under cursor. 21360786Sps CNTL-BACKSPACE ESC-BACKSPACE Delete word to left of cursor. 21460786Sps CNTL-DELETE ESC-DELETE ESC-X Delete word under cursor. 21560786Sps CNTL-U ESC (MS-DOS only) Delete entire line. 21660786Sps UpArrow ESC-k Retrieve previous command line. 21760786Sps DownArrow ESC-j Retrieve next command line. 21860786Sps TAB Complete filename & cycle. 21960786Sps SHIFT-TAB ESC-TAB Complete filename & reverse cycle. 22060786Sps CNTL-L Complete filename, list all. 22160786Sps 222170256Sdelphij 223