xref: /openbsd-src/usr.bin/vi/docs/internals/openmode (revision 45f2ab881194a80ddc05ca14d80589687551be82)
1*45f2ab88Sderaadt	@(#)openmode	8.1 (Berkeley) 10/29/94
2*45f2ab88Sderaadt
3*45f2ab88SderaadtOpen mode has the following special behaviors:
4*45f2ab88Sderaadt
5*45f2ab88Sderaadtz, ^F, ^B:
6*45f2ab88Sderaadt	If count is not specified, it shall default to the window
7*45f2ab88Sderaadt	edit option - 2.
8*45f2ab88Sderaadt
9*45f2ab88Sderaadt	Write lines from the edit buffer starting at:
10*45f2ab88Sderaadt
11*45f2ab88Sderaadt		(the current line) - ((count - 2) / 2)
12*45f2ab88Sderaadt
13*45f2ab88Sderaadt	until:
14*45f2ab88Sderaadt
15*45f2ab88Sderaadt		(((count + 1) / 2) * 2) - 1
16*45f2ab88Sderaadt
17*45f2ab88Sderaadt	lines, or the last line in the edit buffer has been written.  A
18*45f2ab88Sderaadt	line consisting of the smaller of the number of columns in the
19*45f2ab88Sderaadt	display divided by two or 40 ``-'' characters shall be written
20*45f2ab88Sderaadt	immediately before and after the specified is written.  These two
21*45f2ab88Sderaadt	lines shall count against the total number of lines to be written.
22*45f2ab88Sderaadt	A blank line shall be written after the last line is written.
23*45f2ab88Sderaadt
24*45f2ab88Sderaadt	z, ^F and ^B all behave identically.
25*45f2ab88Sderaadt
26*45f2ab88Sderaadt^D:	Display the next scroll value lines, change the current line.
27*45f2ab88Sderaadt
28*45f2ab88Sderaadt^U:	Change the current line, do nothing else.
29*45f2ab88Sderaadt
30*45f2ab88Sderaadt^E, ^Y:	Do nothing.
31*45f2ab88Sderaadt
32*45f2ab88Sderaadt^L:	Clear the screen and redisplay the current line.
33*45f2ab88Sderaadt
34*45f2ab88SderaadtH, L, M:
35*45f2ab88Sderaadt	Move to the first nonblank of the current line and do nothing
36*45f2ab88Sderaadt	else.
37