Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Nov 2013 16:52:02 +0000 (UTC)
From:      Peter Wemm <peter@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r257999 - in head/contrib/nvi: . common docs/USD.doc/vi.man ex vi
Message-ID:  <201311111652.rABGq2po033693@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: peter
Date: Mon Nov 11 16:52:02 2013
New Revision: 257999
URL: http://svnweb.freebsd.org/changeset/base/257999

Log:
  Merge nvi-2.1.1 -> 2.1.2

Modified:
  head/contrib/nvi/README
  head/contrib/nvi/common/main.c
  head/contrib/nvi/docs/USD.doc/vi.man/vi.1
  head/contrib/nvi/ex/ex_print.c
  head/contrib/nvi/ex/version.h
  head/contrib/nvi/vi/v_txt.c
  head/contrib/nvi/vi/vs_refresh.c
Directory Properties:
  head/contrib/nvi/   (props changed)

Modified: head/contrib/nvi/README
==============================================================================
--- head/contrib/nvi/README	Mon Nov 11 16:39:43 2013	(r257998)
+++ head/contrib/nvi/README	Mon Nov 11 16:52:02 2013	(r257999)
@@ -1,6 +1,6 @@
-#	$Id: README,v 9.0 2012/10/07 09:13:54 zy Exp $
+#	$Id: README,v 9.1 2013/11/02 02:50:23 zy Exp $
 
-This is version 2.1.1 (2012-10-07) of nex/nvi, a reimplementation of the ex/vi
+This is version 2.1.2 (2012-11-02) of nex/nvi, a reimplementation of the ex/vi
 text editors originally distributed as part of the Fourth Berkeley
 Software Distribution (4BSD), by the University of California, Berkeley.
 

Modified: head/contrib/nvi/common/main.c
==============================================================================
--- head/contrib/nvi/common/main.c	Mon Nov 11 16:39:43 2013	(r257998)
+++ head/contrib/nvi/common/main.c	Mon Nov 11 16:52:02 2013	(r257999)
@@ -11,9 +11,9 @@
 
 #ifndef lint
 static const char copyright[] =
-"%Z% Copyright (c) 1992, 1993, 1994\n\
+"@(#) Copyright (c) 1992, 1993, 1994\n\
 	The Regents of the University of California.  All rights reserved.\n\
-%Z% Copyright (c) 1992, 1993, 1994, 1995, 1996\n\
+@(#) Copyright (c) 1992, 1993, 1994, 1995, 1996\n\
 	Keith Bostic.  All rights reserved.\n";
 #endif /* not lint */
 

Modified: head/contrib/nvi/docs/USD.doc/vi.man/vi.1
==============================================================================
--- head/contrib/nvi/docs/USD.doc/vi.man/vi.1	Mon Nov 11 16:39:43 2013	(r257998)
+++ head/contrib/nvi/docs/USD.doc/vi.man/vi.1	Mon Nov 11 16:52:02 2013	(r257999)
@@ -5,1619 +5,2742 @@
 .\" Copyright (c) 2011
 .\"	Zhihao Yuan.  All rights reserved.
 .\"
-.\" This document may not be republished without written permission from
-.\" Keith Bostic. 
+.\" The vi program is freely redistributable.
+.\" You are welcome to copy, modify and share it with others
+.\" under the conditions listed in the LICENSE file.
+.\" If any company (not individual!) finds vi sufficiently useful
+.\" that you would have purchased it, or if any company wishes to
+.\" redistribute it, contributions to the authors would be appreciated.
 .\"
-.\" See the LICENSE file for redistribution information.
+.\"     $Id: vi.1,v 9.0 2013/11/02 12:11:56 zy Exp $
+.\"     $FreeBSD$
 .\"
-.\"     @(#)vi.1       8.51 (Berkeley) 10/10/96
-.\"	$FreeBSD$
-.\"     $Id: vi.1,v 8.59 2012/02/12 12:56:37 zy Exp $
-.\"
-.TH VI 1 "11 February, 2012"
-.UC
-.SH NAME
-ex, vi, view \- text editors
-.SH SYNOPSIS
-.B ex
-[\c
-.B -eFRrSsv\c
-] [\c
-.BI -c " cmd"\c
-] [\c
-.BI -t " tag"\c
-] [\c
-.BI -w " size"\c
-] [file ...]
-.br
-.B vi
-[\c
-.B -eFlRrSv\c
-] [\c
-.BI -c " cmd"\c
-] [\c
-.BI -t " tag"\c
-] [\c
-.BI -w " size"\c
-] [file ...]
-.br
-.B view
-[\c
-.B -eFRrSv\c
-] [\c
-.BI -c " cmd"\c
-] [\c
-.BI -t " tag"\c
-] [\c
-.BI -w " size"\c
-] [file ...]
-.SH LICENSE
-The vi program is freely redistributable.  You are welcome to copy,
-modify and share it with others under the conditions listed in the
-LICENSE file.  If any company (not individual!) finds vi sufficiently
-useful that you would have purchased it, or if any company wishes to
-redistribute it, contributions to the authors would be appreciated.
-.SH DESCRIPTION
-.I \&Vi
-is a screen oriented text editor.
-.I \&Ex
+.Dd November 2, 2013
+.Dt VI 1
+.Os
+.Sh NAME
+.Nm ex , vi , view
+.Nd text editors
+.Sh SYNOPSIS
+.Nm ex
+.Op Fl FRrSsv
+.Op Fl c Ar cmd
+.Op Fl t Ar tag
+.Op Fl w Ar size
+.Op Ar
+.Nm vi\ \&
+.Op Fl eFRrS
+.Op Fl c Ar cmd
+.Op Fl t Ar tag
+.Op Fl w Ar size
+.Op Ar
+.Nm view
+.Op Fl eFrS
+.Op Fl c Ar cmd
+.Op Fl t Ar tag
+.Op Fl w Ar size
+.Op Ar
+.Sh DESCRIPTION
+.Nm vi
+is a screen-oriented text editor.
+.Nm ex
 is a line-oriented text editor.
-.I \&Ex
+.Nm ex
 and
-.I \&vi
+.Nm vi
 are different interfaces to the same program,
 and it is possible to switch back and forth during an edit session.
-.I View
+.Nm view
 is the equivalent of using the
-.B \-R
-(read-only) option of
-.IR \&vi .
-.PP
+.Fl R
+.Pq read-only
+option of
+.Nm vi .
+.Pp
 This manual page is the one provided with the
-.I nex/nvi
+.Nm nex Ns / Ns Nm nvi
 versions of the
-.I ex/vi
+.Nm ex Ns / Ns Nm vi
 text editors.
-.I Nex/nvi
+.Nm nex Ns / Ns Nm nvi
 are intended as bug-for-bug compatible replacements for the original
-Fourth Berkeley Software Distribution (4BSD)
-.I \&ex
+Fourth Berkeley Software Distribution
+.Pq 4BSD
+.Nm ex
 and
-.I \&vi
+.Nm vi
 programs.
 For the rest of this manual page,
-.I nex/nvi
+.Nm nex Ns / Ns Nm nvi
 is used only when it's necessary to distinguish it from the historic
 implementations of
-.IR ex/vi .
-.PP
+.Nm ex Ns / Ns Nm vi .
+.Pp
 This manual page is intended for users already familiar with
-.IR ex/vi .
+.Nm ex Ns / Ns Nm vi .
 Anyone else should almost certainly read a good tutorial on the
 editor before this manual page.
-If you're in an unfamiliar environment, and you absolutely have to
-get work done immediately, read the section after the options
-description, entitled ``Fast Startup''.
+If you're in an unfamiliar environment,
+and you absolutely have to get work done immediately,
+read the section after the options description, entitled
+.Sx FAST STARTUP .
 It's probably enough to get you going.
-.PP
+.Pp
 The following options are available:
-.TP
-.B \-c
+.Bl -tag -width "-w size "
+.It Fl c Ar cmd
 Execute
-.B cmd
-immediately after starting the edit session.
-Particularly useful for initial positioning in the file, however
-.B cmd
+.Ar cmd
+on the first file loaded.
+Particularly useful for initial positioning in the file, although
+.Ar cmd
 is not limited to positioning commands.
-This is the POSIX 1003.2 interface for the historic ``+cmd'' syntax.
-.I Nex/nvi
+This is the POSIX 1003.2 interface for the historic
+.Dq +cmd
+syntax.
+.Nm nex Ns / Ns Nm nvi
 supports both the old and new syntax.
-.TP
-.B \-e
+.It Fl e
 Start editing in ex mode, as if the command name were
-.IR \&ex .
-.TP
-.B \-F
+.Nm ex .
+.It Fl F
 Don't copy the entire file when first starting to edit.
 (The default is to make a copy in case someone else modifies
 the file during your edit session.)
-.TP
-.B \-l
-Start editing with the lisp and showmatch options set.
-.TP
-.B \-R
+.\" .It Fl l
+.\" Start editing with the lisp and showmatch options set.
+.It Fl R
 Start editing in read-only mode, as if the command name was
-.IR view ,
+.Nm view ,
 or the
-.B readonly
+.Cm readonly
 option was set.
-.TP
-.B \-r
+.It Fl r
 Recover the specified files, or, if no files are specified,
 list the files that could be recovered.
 If no recoverable files by the specified name exist,
 the file is edited as if the
-.B \-r
+.Fl r
 option had not been specified.
-.TP
-.B \-S
+.It Fl S
 Run with the
-.B secure
+.Cm secure
 edit option set, disallowing all access to external programs.
-.TP
-.B \-s
+.It Fl s
 Enter batch mode; applicable only to
-.I \&ex
+.Nm ex
 edit sessions.
 Batch mode is useful when running
-.I \&ex
+.Nm ex
 scripts.
-Prompts, informative messages and other user oriented message
-are turned off,
+Prompts, informative messages and other user oriented messages are turned off,
 and no startup files or environment variables are read.
-This is the POSIX 1003.2 interface for the historic ``\-'' argument.
-.I \&Nex/nvi
+This is the POSIX 1003.2 interface for the historic
+.Dq -
+argument.
+.Nm nex Ns / Ns Nm nvi
 supports both the old and new syntax.
-.TP
-.B \-t
-Start editing at the specified tag.
-(See
-.IR ctags (1)).
-.TP
-.B \-w
-Set the initial window size to the specified number of lines.
-.TP
-.B \-v
+.It Fl t Ar tag
+Start editing at the specified
+.Ar tag
+.Pq see Xr ctags 1 .
+.It Fl v
 Start editing in vi mode, as if the command name was
-.I \&vi
-or
-.IR view .
-.PP
+.Nm vi .
+.It Fl w Ar size
+Set the initial window size to the specified number of lines.
+.El
+.Pp
 Command input for
-.I ex/vi
+.Nm ex Ns / Ns Nm vi
 is read from the standard input.
 In the
-.I \&vi
+.Nm vi
 interface, it is an error if standard input is not a terminal.
 In the
-.I \&ex
+.Nm ex
 interface, if standard input is not a terminal,
-.I \&ex
-will read commands from it regardless, however, the session will be a
+.Nm ex
+will read commands from it regardless; however, the session will be a
 batch mode session, exactly as if the
-.B \-s
+.Fl s
 option had been specified.
-.PP
-.I Ex/vi
-exits 0 on success, and greater than 0 if an error occurs.
-.SH FAST STARTUP
+.Sh FAST STARTUP
 This section will tell you the minimum amount that you need to
 do simple editing tasks using
-.IR \&vi .
-If you've never used any screen editor before, you're likely to have
-problems even with this simple introduction.
+.Nm vi .
+If you've never used any screen editor before,
+you're likely to have problems even with this simple introduction.
 In that case you should find someone that already knows
-.I \&vi
+.Nm vi
 and have them walk you through this section.
-.PP
-.I \&Vi
+.Pp
+.Nm vi
 is a screen editor.
-This means that it takes up almost the entire screen, displaying part
-of the file on each screen line, except for the last line of the screen.
+This means that it takes up almost the entire screen,
+displaying part of the file on each screen line,
+except for the last line of the screen.
 The last line of the screen is used for you to give commands to
-.IR \&vi ,
+.Nm vi ,
 and for
-.I \&vi
+.Nm vi
 to give information to you.
-.PP
+.Pp
 The other fact that you need to understand is that
-.I \&vi
-is a modeful editor, i.e. you are either entering text or you
-are executing commands, and you have to be in the right mode
-to do one or the other.
+.Nm vi
+is a modeful editor,
+i.e., you are either entering text or you are executing commands,
+and you have to be in the right mode to do one or the other.
 You will be in command mode when you first start editing a file.
 There are commands that switch you into input mode.
 There is only one key that takes you out of input mode,
-and that is the <escape> key.
-(Key names are written using less-than and greater-than signs, e.g.
-<escape> means the ``escape'' key, usually labeled ``esc'' on your
-terminal's keyboard.)
+and that is the
+.Aq escape
+key.
+.Pp
+Key names are written using less-than and greater-than signs, e.g.,
+.Aq escape
+means the
+.Dq escape
+key, usually labeled
+.Dq Esc
+on your terminal's keyboard.
 If you're ever confused as to which mode you're in,
-keep entering the <escape> key until
-.I \&vi
+keep entering the
+.Aq escape
+key until
+.Nm vi
 beeps at you.
-(Generally,
-.I \&vi
+Generally,
+.Nm vi
 will beep at you if you try and do something that's not allowed.
-It will also display error messages.)
-.PP
-To start editing a file, enter the command ``vi file_name<carriage-return>''.
-The command you should enter as soon as you start editing is
-``:set verbose showmode<carriage-return>''.
+It will also display error messages.
+.Pp
+To start editing a file, enter the following command:
+.Pp
+.Dl $ vi file
+.Pp
+The command you should enter as soon as you start editing is:
+.Pp
+.Dl :set verbose showmode
+.Pp
 This will make the editor give you verbose error messages and display
 the current mode at the bottom of the screen.
-.PP
+.Pp
 The commands to move around the file are:
-.TP
-.B h
+.Bl -tag -width Ds
+.It Cm h
 Move the cursor left one character.
-.TP
-.B j
+.It Cm j
 Move the cursor down one line.
-.TP
-.B k
+.It Cm k
 Move the cursor up one line.
-.TP
-.B l
+.It Cm l
 Move the cursor right one character.
-.TP
-.B <cursor-arrows>
+.It Aq Cm cursor-arrows
 The cursor arrow keys should work, too.
-.TP
-.B /text<carriage-return>
-Search for the string ``text'' in the file,
+.It Cm / Ns text
+Search for the string
+.Dq text
+in the file,
 and move the cursor to its first character.
-.PP
+.El
+.Pp
 The commands to enter new text are:
-.TP
-.B a
-Append new text,
-.I after
-the cursor.
-.TP
-.B i
-Insert new text,
-.I before
-the cursor.
-.TP
-.B o
-Open a new line below the line the cursor is on, and start
-entering text.
-.TP
-.B O
-Open a new line above the line the cursor is on, and start
-entering text.
-.TP
-.B <escape>
-Once you've entered input mode using the one of the
-.BR \&a ,
-.BR \&i ,
-.BR \&O
-or 
-.B \&o
+.Bl -tag -width "<escape>"
+.It Cm a
+Append new text, after the cursor.
+.It Cm i
+Insert new text, before the cursor.
+.It Cm o
+Open a new line below the line the cursor is on, and start entering text.
+.It Cm O
+Open a new line above the line the cursor is on, and start entering text.
+.It Aq Cm escape
+Once you've entered input mode using one of the
+.Cm a ,
+.Cm i ,
+.Cm o
+or
+.Cm O
 commands, use
-.B <escape>
+.Aq Cm escape
 to quit entering text and return to command mode.
-.PP
+.El
+.Pp
 The commands to copy text are:
-.TP
-.B yy
+.Bl -tag -width Ds
+.It Cm yy
 Copy the line the cursor is on.
-.TP
-.B p
+.It Cm p
 Append the copied line after the line the cursor is on.
-.PP
+.El
+.Pp
 The commands to delete text are:
-.TP
-.B dd
+.Bl -tag -width Ds
+.It Cm dd
 Delete the line the cursor is on.
-.TP
-.B x
+.It Cm x
 Delete the character the cursor is on.
-.PP
+.El
+.Pp
 The commands to write the file are:
-.TP
-.B :w<carriage-return>
+.Bl -tag -width Ds
+.It Cm :w
 Write the file back to the file with the name that you originally used
 as an argument on the
-.I \&vi
+.Nm vi
 command line.
-.TP
-.B ":w file_name<carriage-return>"
-Write the file back to the file with the name ``file_name''.
-.PP
+.It Cm :w Ar file_name
+Write the file back to the file with the name
+.Ar file_name .
+.El
+.Pp
 The commands to quit editing and exit the editor are:
-.TP
-.B :q<carriage-return>
-Quit editing and leave vi (if you've modified the file, but not
-saved your changes,
-.I \&vi
+.Bl -tag -width Ds
+.It Cm :q
+Quit editing and leave
+.Nm vi
+(if you've modified the file, but not saved your changes,
+.Nm vi
 will refuse to quit).
-.TP
-.B :q!<carriage-return>
+.It Cm :q!
 Quit, discarding any modifications that you may have made.
-.PP
-One final caution.
+.El
+.Pp
+One final caution:
 Unusual characters can take up more than one column on the screen,
 and long lines can take up more than a single screen line.
-The above commands work on ``physical'' characters and lines,
-i.e. they affect the entire line no matter how many screen lines it
-takes up and the entire character no matter how many screen columns
-it takes up.
-.SH VI COMMANDS
+The above commands work on
+.Dq physical
+characters and lines,
+i.e., they affect the entire line no matter how many screen lines it takes up
+and the entire character no matter how many screen columns it takes up.
+.Sh REGULAR EXPRESSIONS
+.Nm ex Ns / Ns Nm vi
+supports regular expressions
+.Pq REs ,
+as documented in
+.Xr re_format 7 ,
+for line addresses, as the first part of the
+.Nm ex Cm substitute ,
+.Cm global
+and
+.Cm v
+commands, and in search patterns.
+Basic regular expressions
+.Pq BREs
+are enabled by default;
+extended regular expressions
+.Pq EREs
+are used if the
+.Cm extended
+option is enabled.
+The use of regular expressions can be largely disabled using the
+.Cm magic
+option.
+.Pp
+The following strings have special meanings in the
+.Nm ex Ns / Ns Nm vi
+version of regular expressions:
+.Bl -bullet -offset 6u
+.It
+An empty regular expression is equivalent to the last regular expression used.
+.It
+.Sq \e\(la
+matches the beginning of the word.
+.It
+.Sq \e\(ra
+matches the end of the word.
+.It
+.Sq \(a~
+matches the replacement part of the last
+.Cm substitute
+command.
+.El
+.Sh BUFFERS
+A buffer is an area where commands can save changed or deleted text
+for later use.
+.Nm vi
+buffers are named with a single character preceded by a double quote,
+for example
+.Pf \&" Ns Aq c ;
+.Nm ex
+buffers are the same,
+but without the double quote.
+.Nm nex Ns / Ns Nm nvi
+permits the use of any character without another meaning in the position where
+a buffer name is expected.
+.Pp
+All buffers are either in
+.Em line mode
+or
+.Em character mode .
+Inserting a buffer in line mode into the text creates new lines for each of the
+lines it contains, while a buffer in character mode creates new lines for any
+lines
+.Em other
+than the first and last lines it contains.
+The first and last lines are inserted at the current cursor position, becoming
+part of the current line.
+If there is more than one line in the buffer,
+the current line itself will be split.
+All
+.Nm ex
+commands which store text into buffers do so in line mode.
+The behaviour of
+.Nm vi
+commands depend on their associated motion command:
+.Bl -bullet -offset 6u
+.It
+.Aq Cm control-A ,
+.Cm h ,
+.Cm l ,
+.Cm ,\& ,
+.Cm 0 ,
+.Cm B ,
+.Cm E ,
+.Cm F ,
+.Cm T ,
+.Cm W ,
+.Cm ^ ,
+.Cm b ,
+.Cm e ,
+.Cm f
+and
+.Cm t
+make the destination buffer character-oriented.
+.It
+.Cm j ,
+.Aq Cm control-M ,
+.Cm k ,
+.Cm ' ,
+.Cm - ,
+.Cm G ,
+.Cm H ,
+.Cm L ,
+.Cm M ,
+.Cm _
+and
+.Cm |\&
+make the destination buffer line-oriented.
+.It
+.Cm $ ,
+.Cm % ,
+.Cm ` ,
+.Cm (\& ,
+.Cm )\& ,
+.Cm / ,
+.Cm ?\& ,
+.Cm [[ ,
+.Cm ]] ,
+.Cm {
+and
+.Cm }
+make the destination buffer character-oriented, unless the starting and
+end positions are the first and last characters on a line.
+In that case, the buffer is line-oriented.
+.El
+.Pp
+The
+.Nm ex
+command
+.Cm display buffers
+displays the current mode for each buffer.
+.Pp
+Buffers named
+.Sq a
+through
+.Sq z
+may be referred to using their uppercase equivalent, in which case new content
+will be appended to the buffer, instead of replacing it.
+.Pp
+Buffers named
+.Sq 1
+through
+.Sq 9
+are special.
+A region of text modified using the
+.Cm c
+.Pq change
+or
+.Cm d
+.Pq delete
+commands is placed into the numeric buffer
+.Sq 1
+if no other buffer is specified and if it meets one of the following conditions:
+.Bl -bullet -offset 6u
+.It
+It includes characters from more than one line.
+.It
+It is specified using a line-oriented motion.
+.It
+It is specified using one of the following motion commands:
+.Aq Cm control-A ,
+.Cm ` Ns Aq Cm character ,
+.Cm n ,
+.Cm N ,
+.Cm % ,
+.Cm / ,
+.Cm { ,
+.Cm } ,
+.Cm \&( ,
+.Cm \&) ,
+and
+.Cm \&? .
+.El
+.Pp
+Before this copy is done, the previous contents of buffer
+.Sq 1
+are moved into buffer
+.Sq 2 ,
+.Sq 2
+into buffer
+.Sq 3 ,
+and so on.
+The contents of buffer
+.Sq 9
+are discarded.
+Note that this rotation occurs
+.Em regardless
+of the user specifying another buffer.
+In
+.Nm vi ,
+text may be explicitly stored into the numeric buffers.
+In this case, the buffer rotation occurs before the replacement of the buffer's
+contents.
+The numeric buffers are only available in
+.Nm vi
+mode.
+.Sh VI COMMANDS
 The following section describes the commands available in the command
 mode of the
-.I \&vi
+.Nm vi
 editor.
-In each entry below, the tag line is a usage synopsis for the command
-character.
-.PP
-.TP
-.B "[count] <control-A>"
+The following words have a special meaning in the commands description:
+.Pp
+.Bl -tag -width bigword -compact -offset 3u
+.It Ar bigword
+A set of non-whitespace characters.
+.It Ar buffer
+Temporary area where commands may place text.
+If not specified, the default buffer is used.
+See also
+.Sx BUFFERS ,
+above.
+.It Ar count
+A positive number used to specify the desired number of iterations
+of a command.
+It defaults to 1 if not specified.
+.It Ar motion
+A cursor movement command which indicates the other end of the affected region
+of text, the first being the current cursor position.
+Repeating the command character makes it affect the whole current line.
+.It Ar word
+A sequence of letters, digits or underscores.
+.El
+.Pp
+.Ar buffer
+and
+.Ar count ,
+if both present, may be specified in any order.
+.Ar motion
+and
+.Ar count ,
+if both present, are effectively multiplied together
+and considered part of the motion.
+.Pp
+.Bl -tag -width Ds -compact
+.It Xo
+.Aq Cm control-A
+.Xc
 Search forward
-.I count
-times for the current word.
-.TP
-.B "[count] <control-B>"
+for the word starting at the cursor position.
+.Pp
+.It Xo
+.Op Ar count
+.Aq Cm control-B
+.Xc
 Page backwards
-.I count
+.Ar count
 screens.
-.TP
-.B "[count] <control-D>"
+Two lines of overlap are maintained, if possible.
+.Pp
+.It Xo
+.Op Ar count
+.Aq Cm control-D
+.Xc
 Scroll forward
-.I count
+.Ar count
 lines.
-.TP
-.B "[count] <control-E>"
+If
+.Ar count
+is not given, scroll forward the number of lines specified by the last
+.Aq Cm control-D
+or
+.Aq Cm control-U
+command.
+If this is the first
+.Aq Cm control-D
+command, scroll half the number of lines in the current screen.
+.Pp
+.It Xo
+.Op Ar count
+.Aq Cm control-E
+.Xc
 Scroll forward
-.I count
+.Ar count
 lines, leaving the current line and column as is, if possible.
-.TP
-.B "[count] <control-F>"
+.Pp
+.It Xo
+.Op Ar count
+.Aq Cm control-F
+.Xc
 Page forward
-.I count
+.Ar count
 screens.
-.TP
-.B "<control-G>"
-Display the file information.
-.TP
-.B "<control-H>"
-.TP
-.B "[count] h"
+Two lines of overlap are maintained, if possible.
+.Pp
+.It Aq Cm control-G
+Display the following file information:
+the file name
+.Pq as given to Nm vi ;
+whether the file has been modified since it was last written;
+if the file is read-only;
+the current line number;
+the total number of lines in the file;
+and the current line number as a percentage of the total lines in the file.
+.Pp
+.It Xo
+.Op Ar count
+.Aq Cm control-H
+.Xc
+.It Xo
+.Op Ar count
+.Cm h
+.Xc
 Move the cursor back
-.I count
+.Ar count
 characters in the current line.
-.TP
-.B "[count] <control-J>"
-.TP
-.B "[count] <control-N>"
-.TP
-.B "[count] j"
+.Pp
+.It Xo
+.Op Ar count
+.Aq Cm control-J
+.Xc
+.It Xo
+.Op Ar count
+.Aq Cm control-N
+.Xc
+.It Xo
+.Op Ar count
+.Cm j
+.Xc
 Move the cursor down
-.I count
+.Ar count
 lines without changing the current column.
-.TP
-.B "<control-L>"
-.TP
-.B "<control-R>"
+.Pp
+.It Aq Cm control-L
+.It Aq Cm control-R
 Repaint the screen.
-.TP
-.B "[count] <control-M>"
-.TP
-.B "[count] +"
+.Pp
+.It Xo
+.Op Ar count
+.Aq Cm control-M
+.Xc
+.It Xo
+.Op Ar count
+.Cm +
+.Xc
 Move the cursor down
-.I count
-lines to the first nonblank character of that line.
-.TP
-.B "[count] <control-P>"
-.TP
-.B "[count] k"
+.Ar count
+lines to the first non-blank character of that line.
+.Pp
+.It Xo
+.Op Ar count
+.Aq Cm control-P
+.Xc
+.It Xo
+.Op Ar count
+.Cm k
+.Xc
 Move the cursor up
-.I count
+.Ar count
 lines, without changing the current column.
-.TP
-.B "<control-T>"
+.Pp
+.It Aq Cm control-T
 Return to the most recent tag context.
-.TP
-.B "<control-U>"
+.Pp
+.It Xo
+.Op Ar count
+.Aq Cm control-U
+.Xc
 Scroll backwards
-.I count
+.Ar count
 lines.
-.TP
-.B "<control-W>"
-Switch to the next lower screen in the window, or, to the first
-screen if there are no lower screens in the window.
-.TP
-.B "<control-Y>"
+If

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311111652.rABGq2po033693>