Z
(C) Copyright 1983
Fred Bourgeois
William Cook
Chris Warth
Tulane University
Department of Computer Science
New Orleans, LA 70118
October 1983
ABSTRACT
Z is a text editor designed to make communication with the computer a
fruitful exchange by providing a logical editing environment. Z is
most useful for creating programs in structured languages, i.e. "C",
Lisp, and Pascal. The editor also provides word processing functions,
especially useful for maintaining online documents, which are changed
often and formatted infrequently. It was conceived with the notion of
making writing programs, letters, and documents of any sort both
easier and faster.
Information about Z is available from three other sources:
Z Tutorial This is a gentle introduction to productive use of Z.
Just type "ZINTRO" at command level.
System Help Portions of this document are indexed by the system
help facility. Just type "HELP Z."
Online help When running Z, a short explanation of the function
associated with a key may by loaded through the
command. See section IV for further information on
this command.
Note: This document describes the version of Z currently running
under the VAX/VMS operating system at Tulane. Most of what is
described in this document is valid for other implementations,
however, some functions may not exist or may act differently
under different operating systems.
Table of Contents
ABSTRACT
I INTRODUCTION
using Z
windows
the status line
entering text
cursor movement
window movement
inserting space
deleting text
II PHILOSOPHY
buffers and files
presentation and representation
History
III ADVANCED FEATURES
Arguments
text box line stream
Word processing
Switches
Command input mapping
IV COMMANDS
Cursor return up down left right tab home
Display advance backup newpage oldpage setwindow
setline
Insert sinsert linsert put get
Delete delete ldelete backdelete delword
Search msearch psearch replace qreplace
Buffer file split mark delbuf
word fill flushright flushleft balance
upper lower center
Switches showswitch setswitch showmap
misc. exit quit toggle information rotate push
VI INTERNALS AND PORTABILITY
I INTRODUCTION
This section introduces the some basic editing functions of Z. All of
these functions are expanded on later in the document but they are
introduced here so that you can start editing right away. By basic
editing functions, we mean functions that display, insert, and delete
text. If you have never used a text editor before, you will find this
small set of basic editing functions useful on their own; as you
become more experienced, you should be able to expand your knowledge
and increase your productivity. We suggest trying the "interactive"
tutorial first, and then reading the rest of this introduction. If
you are familiar with other text editors, you may want to skip the
introduction and go straight to the detailed description of arguments
and commands. Begin with the philosophy section and continue to the
end.
The first thing to do is to get into the editor. (Here 'get into' is
computer jargon; it means the same as 'invoke' or 'call up'.) To
start Z just type:
Z filename
at the system prompt. Filename is the name of the file you want to
edit. Usually file names have two parts, separated by a dot: a first
name, and a type name. The type name gives a hint about what sort of
information the file contains. So a filename might be "z.doc" or
"prob1.pas". For example, to edit this document we typed:
$ Z [z.help]z.doc
If the file does not currently exist in your directory, Z will ask if
you want to create the file. Type 'y' if you want to create the file
or 'n' if you do not. If the file exists, Z will open it and read its
contents. To make things easier, Z also remembers a lot about what
you have been doing lately: it knows what files you are working on,
other files you have worked on recently, and what part of these files
is important. All this information is stored permanently, so it
remembers even from one day to the next. Typing just "Z", without any
filename, will tell Z to go back to the last file edited.
Windows
Once you are running Z, the screen is completely devoted to editing.
This screen is called a window, which shows a portion of your file.
The window size is determined by the physical size of a terminal, but
a file can be arbitrarily large. Here is a picture of the file and a
window:
It is somewhat deflating to be shown publicly and
+------------------------+
incontrovertibly by a machine that even when we do
| |
try, we in fact make just as many mistakes as other
| |
people. If your pride cannot recover from this blow,
| |
you will never make a programmer.
| |
+------------------------+
The window is five lines long, and twenty-six characters wide,
somewhat smaller then a typical window, but it functions in the same
way. It starts on the second line of the file, at the tenth column.
It would look like this on the screen:
[z]cookie.dat (2, 10)
+--------------------------+
|ertibly by a machine that |
|n fact make just as many m|
|If your pride cannot recov|
|never make a programmer. |
| |
+--------------------------+
Conceptually, Z is a window into your file. The file has a top left
corner, and extends down and to the right, and can be very large. The
window is the size of the terminal screen. You have the ability to
move the window in any direction so that you can view any part of your
file. Naturally, if you are just starting a file then the window or
screen will be blank until you type something. After the file has
been created, one screenful of the contents of the file will be
displayed.
The Status Line
As you can see, most of the screen is used to display a file, but one
line is reserved for other sorts of information: the status line.
The status line is always displayed as the very first line at the top
of the screen during any editing session. As its name implies, the
status line displays the current status of your editing session. Your
status line will look something like this:
[z]z.doc (92, 1) Down search failed
In general, the status line is of the form:
Filename (Line, Column) Message
Filename
Name of the file currently being edited. The filename also
includes the name of the directory in which the file resides. The
directory name is usually your last name, or a project name. In
the first example, the filename is "[z]z.doc".
(Line, Column)
Together these two numbers define the location of the upper left
corner of the screen in relation to the top of the file. Line
indicates how far the screen is from the top of the file, and
Column indicates how far the screen is from the left edge of the
file. The top left corner of the file is numbered (1, 1). In the
example, the screen is on line 92, column 1.
Message
Various messages give information about the status of the editor.
The messages usually indicate unusual situations: Z does not say
anything when things are going well. The message in the example
indicates that a search pattern could not be found in the rest of
the file.
Entering Text
Once you are in the editor you can just type whatever you want to be
in the file. Whatever you type will go into the file at the point you
type. If you type some new characters over some old ones, the old
ones are completely lost, and the new characters take their place.
Cursor Movement
You can move around on the screen using the cursor movement keys. For
initiates, the small blinking block or line on the terminal is called
a cursor. It is used in Z to indicate where you are currently located
in relation to the window being displayed. This cursor is a physical
attribute of most terminals, and is always visible. It is a focal
point.
There are lots of keys that move the cursor, but four of them in
particular make very simple movements. These keys move the cursor up,
down, right, or left. They are usually labeled with arrows. If your
terminal does not have arrow keys, consult a local guru to find out
how to move the cursor.
You can move anywhere within the current window by using these keys.
In fact, you can move anywhere in your document with just the arrow
keys. Because it makes no sense for the cursor to move of the screen,
it must either stop when it runs into the side, or the window must
move so that it contains the cursor. Both of these possibilities are
available. As a matter of fact, Z discourages going of the right side
of the screen: the cursor just stops at the edge. But if you move
off the top or bottom, the window will jump to follow the cursor. Any
change in the coordinates of the display screen in relation to the top
of the document will be reflected in the numbers shown on the status
line.
Having the capability to move anywhere in a window is great but having
the ability to move anywhere in a file is even better. Although you
can move through a file using just the arrow keys, that method is slow
and prone to error. The cursor is for fine movements; to see the
rest of the file there are commands which make larger jumps.
Window Movement
There are four basic window movement commands. The first two simply
move the window up or down a few lines. This is known as scrolling
the page. The other two commands are used to move ahead whole pages
at a time.
Control-A advance window a few lines
Control-B backup window a few lines
Control-N move forward to new page
Control-O move back to old page
Inserting Space
Often one wishes to add some text to a file right in between some
existing lines of text. For this reason there is an insert line
command. This command will insert one blank line at the current
cursor position and all lines below the current position will be moved
down. The last line in the window will disappear off the bottom of
the window (but it will not be lost from memory!)
In the same way, one often wants to insert single characters in an
existing line. The insertchar command inserts a blank at the current
cursor position and moves all characters to the right of the cursor
over one.
Control-V insert a space by moving characters to the right of the cursor
Control-L insert a line by moving lines below cursor down
Deleting Text
Deletion of text acts in exactly the oppposite manner of insertion.
Line delete will delete the line that the cursor is currently on and
will move all lines below the current one up. Use the character
delete function to delete the character under the cursor. All
characters to the left of the cursor will be moved one character to
the left.
Control-D delete the character under the cursor
Control-U delete the line the cursor is on
Using the commands introduced so far, it is possible to do almost any
basic editing task. However it would be rather cumbersome to delete,
say, 30 lines of text. This would involve using the delete line
command 30 times. An easier way to do the same thing would be to give
an argument along with the command indicating how many times you want
the command to be performed. The argument facility
of Z is explained in a later section.
II PHILOSOPHY
To use Z productively, one should be familiar with its general
philosophical framework. This philosophy can be summed up by the
motto: "what you see is what you get." That is, when Z reads a file
into a buffer, or writes a buffer to a file, the display given by Z
exactly matches the file. To understand how Z works under this motto,
one must also understand the usage of the terms "file" and "buffer."
Buffers and Files
A file is most conveniently defined as a finite vector of ASCII
characters. Certain characters, called control characters, have
special interpretations. One control character, Null, marks the end
of a file. Another one, line feed, serves to break the file into a
sequence of lines. Other control characters include backspace, which
causes the next character to overstrike the last one; carriage
return, which causes lines to overstrike, and tab, which positions the
next character on the next tab stop.
A buffer is defined to be an infinite two-dimensional array of
characters. Each position in the array has a unique line, column
coordinate, and contains exactly one character. Vertically, the lines
of the plane are numbered from one to the length of the buffer, and the
columns are numbered from one to the width of the buffer:
(1,1) (1,2) (1,3) ... (1,w)
(2,1) (2,2) (2,3) ... (2,w)
... ... ... ... ...
(l,1) (l,2) (l,3) ... (l,w)
Presentation and Representation
The philosophy behind Z is based on the notion that buffers are the
most natural model for text manipulation, while files are merely
devices for storing the information in a buffer efficiently on a
computer. That is, text is presented as a logical two dimensional
array, but represented in a file as a linear stream of characters. At
this point, the motto can be stated more rigorously:
"The buffer you see is the file you get"
When Z reads a file into a buffer, each character either affects the
format of the buffer, or takes up a location in the buffer. There are
only three characters that affect format: tab, linefeed, and null.
All other characters are placed into the buffer. Tab causes the next
character to be placed on the next tab stop, where tab stops are
defined as every eighth column. Linefeed signals the end of a line.
Null signals the end of the file. Any other control characters are
simply placed into the buffer; however, they are displayed as reverse
video letters, because they are not visual symbols, but control
symbols. (There is a reason that control characters are displayed
in inverse video instead of as a two character sequence. This
reason is explained in the section on Arguments.)
When converting a buffer into a file, i.e. saving the buffer, Z
generates the appropriate ASCII encoding so the file will look the
same next time it is loaded. One special warning for users of other
editors: Z has its own conventions about where tabs should be placed,
and will remove or re-arrange your tabs if you are not careful.
Specifically, Z removes all tabs when it reads a file, and puts them
back in exclusively at the beginning of each line that starts with a
long run of spaces. To illustrate: If you used another editor to
create this line (with $ standing for a tab, and _ for a space):
"____________the_time$has_come_to$talk_of$many_things"
Z will convert this, by replacing tabs by eight space tab stops, to:
"____________the_time____has_come_to_____talk_of_many_things"
but Z will save it as:
"$____the_time____has_come_to_____talk_of_many_things"
There are switches (see Switch section below) that can be set to
prevent this behavior on the part of Z but we recommend that they not
be set. Z does not display expanded tabs because the argument handler
gets severly confused over characters that span more than one space
(i.e. tabs).
More Buffers
There is another type of buffer in Z, a pick buffer, that is used to
temporarily hold portions of a file buffer for later retrieval. Pick
buffers can receive text either as the result of a Put operation or
as the result of almost any type of delete operation. Put operations
copy text from the file buffer into a pick buffer without destroying
the original text. Delete operations delete text from a file buffer
but retain a copy of what was deleted in a pick buffer. The only
exception to this rule is the deletion of single characters which are
not saved.
Normally a new pick buffer is created each time text is put or
deleted. Through the use of the META command, however, it is possible
to append text to the end of the previous pick buffer. Z saves a
number of pick buffers (default 5) in a circular list. In order to
retrieve the contents of a pick buffer it must be the first buffer in
the list. The buffer list may be rotated by the Rotate command. The
Get command will place the contents of the top pick buffer into the
file buffer at the current location. The effect of the Rotate command
can be seen with the Zinfo command which will present a list of all
pick buffers. Through the use of pick buffers and the Chgbuf command
it is easy to transfer text from one file to another.
History
Tulane Z is in the tradition of a long line of editors at Yale, and is
a direct descendent of the Yale Z editor. A paper [WOOD81] by the
creator of Z, Steven Wood, explains the use of Z as part of a
programming environment. Another discussion of editors in general has
a section on Z [MEYR82].
Some of the best features found in other editors such as EMACS
[STAL81] and UNIX's VI have been implemented along with new ones that
are not found anywhere else.
[MEYR82] Meyrowitz, Norman; and Van Dam, Andries. "Interactive
Editing Systems: I and II," ACM Computing Surveys.
14, 3 (September 1982) pp.321-415.
[STAL81] Stallman, R. M. "EMACS: The Extensible, Customizable
Display Editor," in Proceedings ACM SIGPLAN/SIGOA
Conference on Text Manipulation (Portland, Oregon, June
8-10, 1981), ACM, New York, 1981, pp.147-156.
[WOOD81] Wood, Steven R. "The 95% Program Editor," in Proceedings
ACM SIGPLAN/SIGOA Conference on Text Manipulation
(Portland, Oregon, June 8-10, 1981), ACM, New York, 1981,
pp.1-7.
III ADVANCED FEATURES
Arguments
In Z, an argument is a method of specifying to the editor which
portion of the text to which you wish to apply a command. Z provides
a special argument function to do just this. On other editors it may
be better know as the 'mark' command. Z uses a notation known as
postfix, because you say WHAT you are going to do after WHERE you are
going to do it. This function allows you to enter any one of several
types of arguments and is terminated when you type a command that is
recognized as not being part of the argument. How this recognition is
performed is discussed in detail a little later on.
The argument function, or simply 'arg', is found on function key PF1
on VT100 like terminals and on the BLUE function key on H19's. Arg
can always be invoked by hitting the escape (Control-[) key twice.
When specifying command sequences throughout this document, we will
use the convention that arg means to hit the arg key once, arg-arg
means to hit the arg key twice, and so on. Don't forget, since arg
can be simulated by hitting the escape key twice, arg-arg would mean
to type escape four times.
There are several different types of arguments with which you should
be familiar. In addition, each of these different formats can be
specified in several ways. In the next section is a description of
the internal format of the various types of arguments followed by an
explanation of how each of these types may be entered.
Text Arguments
The first type of arg is called the text arg. This type of argument
is used when searching for a string or when specifying a filename
that you want to edit. Internally, this is stored as a sequence of
ascii characters.
Box Arguments
The next type of arg is called a box arg. The box is specified by two
coordinates. The first is always the current location. The second is
can be anywhere else in the file. These two coordinates are
interpreted as opposing corners of a rectangle within your file. This
box of text is used as a boundary for the next command. Visually, a
box arg looks like this:
T--------+
| |
| |
+--------+B
T is the first coordinate or the current cursor position, and B is the
second coordinate. A box arg may be larger than the size of the
window. Notice that the bottom coordinate, B, is not included in the
box. This is because the COLUMN CONTAINING THE BOTTOM POINT IS NOT
INCLUDED IN THE BOX! We say that the box is inclusive on the left,
top, and bottom, but exclusive on the right.
One might wonder what happens if the top and bottom points are in the
same column? This is appearently a contradiction, because the column
is included as well as excluded. This problem is converted to an
advantage by the next type of argument.
Line Arguments
The line argument is similar to a box but has infinite width.
However, it is represented on the screen as a box of zero width. One
can think of a box getting narrower and narrower until it is going to
disappear, and at that point it jumps to infinite width, very much
like division by zero. A line arg consists of only two numbers, the
line number at the first point and the number of lines that were
specified in the argument. Once again, the first point is always the
current cursor location. You would use a line arg when specifying how
many lines you want to insert or delete. A line arg might be
represented like this:
T
|
|
|
B
This line arg specifies 5 lines beginning at point T.
Stream Arguments
The next type of argument is called a stream arg. This type of arg is
similar to the box arg in that it too is stored as a point and an
offset. However, this type of arg is interpreted differently than a
box arg. Whereas in a box arg, the two points specified the exact
dimensions of a box of text, the stream arg acts to delimit the text
as if it were laid out in one long line, hence the name stream. For
example, a typical stream arg might look like the following:
T-----------------------------------------------. . .
--------------------------------------------------------------. . .
----------------------------------------------------------. . .
--------------------------------------------------------------. . .
-----B
As you can see, the shape represented by a stream arg is significantly
different from that of the box arg. The point T indicates the point
that the arg begins. The arg continues to the end of the first line,
terminating when there are no more non-blank characters to the right,
continues onto the next line, terminating the same way, and goes on
until point B is reached. The character under B is not included in
the scope of the argument. Thus, a stream arg is the way that
sentences are manipulated in Z. Note that had this been a box arg, it
would have only delimited 5 lines and a couple of columns.
One might ask at this point how can a command tell which type of
argument you mean. The way this is done in Z is that each command
expects a certain type of argument. The command will interpret
whatever you pass it as that type of argument. For instance, the
command already introduced as line delete (ldelete) and character
delete (delete) are actually the same type of command but they each
expect a different type of argument. Ldelete expects a line or box
argument while delete (stream delete) expects a stream. Both of
these commands has a default behavior if they are not given any
argument at all. Ldelete deletes the current line and delete deletes
the current character.
Specifying Arguments
There are essentially two ways to specify arguments and they are both
interchangeable. The first type might be called movement specification
and the second is text specification.
To specify an argument through cursor movement it is necessary to place
a mark in your file where you want the argument to start and then to
move to the place where you want the argument to end. This is done by
hitting the arg key and then using the arrow keys to move to the place
where the argument is to end. When you move away from where you hit
the arg key, a mark will be left at that location to indicate where
the argument begins. As mentioned before, any non-argument command
will terminate the argument and perform that command. When you reach
the place where the argument is to end just type the command you want
to execute. This will cause the mark that was left at the beginning
to be removed and the command will execute. As always, you can
prematurely terminate an argument by using the CANCEL command.
For instance, to delete 3 lines in your file type the following
sequence:
1) Move to the first (or last) of the three lines to be removed.
2) Hit the arg key.
3) Use the arrow keys to move to the other end of the arg.
4) Type control-U.
What would happen if you had moved two spaces to the right in addition
to moving down when giving the arg above? Then the argument would have
been interpreted as a box argument and a column of three lines and two
columns would have been deleted.
The other way of specifying args uses the textual representation of
the same information to get the same results. Just as the number 1
can be represented as a single digit or as the word 'one', line and
column offsets can be specified by tracing them out or by writing
their decimal equivalents. For instance, another method of deleting
three lines would be:
1) Move to the first (or last) of the three lines to be removed.
2) Hit the arg key.
3) Type the digit 3 (or -3).
4) Type control-U.
When specifying line and column offsets, the line offset comes first
followed by a comma followed by the column offset. The comma and
column offset can be omitted if it is 0. Therefore, the above
argument could also have been written as '3,0', three lines and zero
columns.
The two methods of argument entry are great for box, line, and stream
arguments, but how would one enter text arguments like those necessary
to perform a string search? Once again it is a choice between entry
by cursor movement or by text entry.
Text entry involves hitting the arg key and then typing in the text
that you want to specify. Don't be alarmed when the cursor jumps to
the status line; it does so to make it clear that you are not typing
characters into the file. The text will appear up on the status line
as you type. Certain editing commands may be used to edit text as you
are specifiying it. These are insertchar, deletechar, quotechar,
softtab, and all arrow keys. Their effect within text args is the
same as normal except that they cannot be given an arg themselves
while editing an argument.
An equivalent way to enter text is to hit the arg key and then use the
cursor keys to move over the text you want to specify. This text will
be taken from your buffer as if you had typed it in. Text may only be
grabbed from a single line with this method of textarg entry;
including more than one line becomes a box arg. A variation of the
text entry by movement is to hit the arg key and then immediately hit
the command you want to perform. In this case the argument will
consist of the next blank terminated word on the current line. If
there is no text to the right of the cursor then the argument will be
null.
In summation, let me review the major types of arguments and the entry
methods for each.
Stream args treat the buffer as one long stream or line of text. A
stream arg that specifies two lines includes all of the text from the
top of the arg, to the end of that line, and then all characters on
the second line up until the end of the argument.
Box and Line args, on the other hand, explicitly specify a virtual box
of characters from which the argument is to be taken. A box arg is
specified by delimiting two opposing corners of a box. Therefore, a
box arg that separates two lines and two columns specifies four
characters as the arg. A Line arg is special type of box arg with no
columns specified. This type of arg serves to delimit a number of
whole lines without specifying how long the lines are.
Text args are simply a stream of characters. By default, text args
are taken as the next word in the current buffer.
A Null arg just means to hit the arg key and then a function key.
Word Processing
Word processing in Z is not like most so called "word" processors.
These word processors place control characters throughout a "document"
to signify paragraph ends, indenting, centering, and underlining. The
user has no control over these characters. While "word processing",
the screen does not look like the final printed page. Also,
"documents" may not be edited or manipulated by any other commands
(append, type, mail, find, Z, etc.)
Z, on the other hand, maintains the file exactly as it would be if it
were printed. Paragraphs are formatted right on the page making
permanent physical modifications to the file, providing immediate
feedback. There are word processing commands to format paragraphs,
center text, change the case (upper or lower) of text, delete words,
etc. Each of these is explained in the commands section below.
Switches
Switches are essentially internal variables in the Z program which may
be set to affect your editing session in non-obvious ways.
Switches are of the form:
switchname=value
where value is a decimal number (#), "yes", "no", "on", or "off".
We have the following switches so far (pound sign, "#", indicates a
positive integer).
width=# terminal width
length=# terminal length
rmargin=# right margin for fill
insertmode=Y/N insertmode on or off
autofill=Y/N automatically fills a line after passing
the right margin.
autosave=# save file every time N changes occur
autosave=0 turns saving off
ignorecase=Y/N when searching or replacing, ignore case
inverse=Y/N control output of inverse video features
(for PM)
tabsize=# size of soft tab
upscroll=# sets up scrolling by percent of screen height
downscroll=# sets down scrolling by percent of screen height
rightscroll=# sets right scrolling by percent of screen width
leftscroll=# sets left scrolling by percent of screen width
ex. rightscroll=25
Command Input Mapping
One of the most radical features in Z is the ability to define commands
on random sequences of characters. This means that it is possible to
have commands on normal keys, not just control keys. Also, You can
define commands to be invoked when a certain sequence of characters is
typed.
Unlike most editors with command mapping, it is impossible to define
an ambiguous character sequence to Z. Because the input stream must
be parsed, Z will continue to read characters as long as confusion
exists as to what command is being entered. For example, if the
sequence "help" is defined to switch to a special file, and "hello"
switches to another then Z will not respond if "hel" is typed, until
it reads the next character. If the character is not "p" or "l", then
an "h" will be inserted in the buffer and the command parser will
proceed to parse the remaining characters. A more ambiguous example
involves two commands, one mapped to "abc" and the other to "abcd".
Upon seeing "abc" the parser knows that it could be one of two
commands. If the next character typed is not a "d" then the "abc"
command will be executed and the character will then be inserted into
the buffer (assuming it too is not mapped to a command.) If the
character is a "d" then the "abcd" command will be executed and the
input stream will be left empty.
There are three types of commands in Z: (1) a standard function which
is usually a compiled subroutine, (2) a literal string, which will be
inserted into the file instead of the defined sequence, or (3) a
macro, which will be fed into the input stream and interpreted as
commands in place of the defined sequence. Literal streams are never
interpreted and are used to create shorthand forms for common input
streams, or to allow a degenerate terminal to generate all the
possible ascii characters (one example is a terminal with a key
broken). Macros allow the quick execution of common command
sequences, for example, to insert in a page marker.
The definitions below formalizes the command definition syntax.
definition :== * :
command :== | |
function :== name of any valid editor command
literal :== "*"
macro :== '*'
There are two characters that are used to enter "special"
characters into a command definition. These are outlined below.
\ (backslash) - quotes the next character. This forces the next
character to be taken literally and no interpretation will
be done. A double backslash, "\\", represents a quoted
backslash, that is, a single backslash.
^ (up arrow) - make control. This forces the next character to be
made into its control equivalent. ^A would result in a
control-A (ascii 1) to be placed in the sequence. ^? is
a special case that results in DELETE. Use backslash to
generate an up arrow: "\^".
The most basic command definition consists of a sequence followed
by a command name separated by a colon. Some typical
command definitions are shown below.
^a:sinsert ^B:chgbuf ^D:linsert ^E:msearch
^f:ldelete ^K:pick ^L:ppages ^N:setline
^o:replace ^[^O:qreplace ^P:position ^Q:mpages
^r:psearch ^S:sdelete ^T:plines ^U:setwind
^v:balance ^W:mlines \\:quotechar
^x:'^['
Note that the backslash is quoted. Whenever a ^X is typed, an escape
(^[) is immediately substituted in the input stream. This also implies
that escape (^[) is a valid substitute for ^X as the first character
in a command. Note however that ^x^[ is NOT the same as ^x^x.
IV COMMANDS
Softcr
Control-M, Carriage Return
Moves the cursor down to the next line, to the first non-blank
character. Softcr will also suggest an appropriate indentation level
if the next line is blank. For text files the suggested indentation
level is just the same as the previous level; for C, Lisp, and Pascal
indentation follows syntactic clues in the surrounding text. Because
Softcr is a cursor movement command, it does not insert a carriage
return character. To insert a carriage return, use the quotechar
command; but be advised that Z will convert the return back into a
line break next time the file is read. Return can be used when
specifying arguments, to move the cursor quickly down to the beginning
of the next line.
Summary of Softcr
Move cursor down to the first non-blank character.
Up
Linefeed, Control-J, Up Arrow
One of the cursor movement commands, up just moves the cursor up
to the next line in the same column. Up is often used to specify
a line or box argument.
Summary of Up
Move cursor up one line.
Switches related to Up
upscroll Percent of screen width the display will jump when the
cursor moves off the bottom of the window. The screen
will not move if upscroll=0; the default is 50.
Down
Linefeed, Control-J, Down Arrow
One of the cursor movement commands, down just moves the cursor down
to the next line in the same column. Down is often used to specify
a line or box argument.
Summary of Down
Move cursor down one line.
Switches related to Down
downscroll Percent of screen width the display will jump when the
cursor moves off the bottom of the window. The screen
will not move if downscroll=0; the default is 50.
Left
Backspace, Control-H, Left Arrow
One of the cursor movement commands, left just moves the cursor left
by one character. It may also be used to move back and forth on text
arguments, to insert, delete, or change characters in the argument.
Summary of Left
Move cursor left.
Switches related to Left
leftscroll Percent of screen width the display will jump when the
cursor moves off the left side of the window. The
screen will not move at all if leftscroll=0. It
defaults to 25 (i.e. jump twenty-five percent).
Right
Control-\, Right Arrow
One of the cursor movement commands, right just moves the cursor right
by one character. It may also be used to move back and forth on text
arguments, to insert, delete, or change characters in the argument.
Summary of Right
Move cursor right.
Switches related to Right
rightscroll Percent of screen width the display will jump when the
cursor moves off the right side of the window. The
screen will not move at all if rightscroll=0. It
defaults to 25 (i.e. jump twenty-five percent).
Tab
Control-I, Tab
Signals the drink machine to dispense a TAB and debit your account*.
Also known to move the cursor right to the next tab stop. Because tab
is a cursor movement command, it does not insert a tab character. To
insert a tab, use the quotechar command; but be advised that Z will
convert the tab character back into spaces next time the file is read.
The Tab can be used when specifying arguments.
* Now, Run downstairs and get it! just kidding, but they actually do
this at Stanford; but then again, they are not all terribly verbal,
so we can forgive them.
Summary of Tab
Move cursor right to the next tab stop.
Switches related to Tab
tabsize Width of tabs; defaults to four. Set it to seven if
you are a fortran hacker.
entab When Z saves a file, it converts runs of spaces at the
beginning of a line to tabs; when it reads a file it
converts tabs into spaces. Setting entab to
false with disable this behavior. Z then becomes much
more like EDT.
rightscroll Percent of screen width the display will jump when the
cursor moves off the right side of the window. The
screen will not move at all if rightscroll=0, which is
the default.
Home
Control-Y
Move cursor to top left of window.
Summary of Home
Move to top left corner of window.
Advance Lines
Control-A
Advance scrolls the window forward by a number of lines without
changing the position of the cursor in the buffer. Advance is the
best used when reading a long document from top to bottom. If the
advance command is given without an argument, it moves the window
forward by a quarter of the window length. If advance is modified by
the arg command, it takes the line the cursor is on to the top of the
window. The window may be advanced by an arbitrary number of lines by
typing the number after the arg command.
Summary of pLines (plus lines)
Move forward by a quarter of the window length.
Move the window so the cursor is at the top.
number Move the window forward by number lines.
Backup Lines
Control-B
Backup scrolls the window backwards by a number of lines without
changing the position of the cursor in the buffer. If the backup
command is given without an argument, it moves the window backward by
a quarter of the window length. If backup is modified by the arg
command, it takes the line the cursor is on to the bottom of the
window. The window may be backed up by an arbitrary number of lines
by typing the number after the arg command, but will stop at the top
of the buffer.
Summary of mLines (minus lines)
Move backward by a quarter of the window length.
Move the window so that the cursor at the bottom.
number Move the window backward by number lines.
New Page
Control-N
Move the window down, so that the line below the current window moves
to the top of the new window. Entering a null argument before
newpage jumps to the bottom of the buffer. A numeric argument gives
the number of pages to skip.
Summary of pPages (plus pages)
Move window to next page.
Move window to bottom of buffer.
num Move window down a number of pages.
Old Page
Control-O
Move the window up, so that the line above the current window moves to
the bottom of the new window. Entering a null argument before
newpage jumps to the top of the buffer. A numeric argument gives
the number of pages to skip.
Summary of mPages (minus pages)
Move window to previous page.
Move window to top of buffer.
num Move window up a number of pages.
Window
Control-W
Rewrites the current window. Because lines may be longer than the
display, sometimes it is necessary to move the window to the right.
In general, one cannot move off the right side of the display using
the right arrow key (see Cursor Right), so the window command must be
used to position the window. A null argument moves the window to the
right so that the left column of the window is on the cursor. A
double argument moves the window all the way back to the left. A
numeric argument moves the window to a particular column.
Summary of SetWindow
Rewrite window.
Position left side of window on cursor.
num Position left side on window at column.
Set Line
Control-Q
Rewrites the current line. A null argument moves to the end of the
current line. A numeric argument moves to given column.
Summary of SetLine
Rewrite current line.
Position cursor at end of line.
num Position cursor at column number on current line.
Insert Character
Control-V
This command will insert a blank under the cursor. All the characters
to the right of the cursor move to the right one space, but the cursor
stays in the same place. In this example insert character is used
twice (the cursor is represented by the arrow).
v
original The time has come to talk of many things.
after first insert The time has c ome to talk of many things.
after second insert The time has c ome to talk of many things.
Modified with a null argument, the insert will break the line on the
cursor by moving the rest of the line down the first column of the
next line. This two line example may make this "break" more clear.
v
original with arg The time has come to talk of many things.
Of mice and men and elephants.
after insert The time has come to ta
lk of many things.
Of mice and men and elephants.
A stream argument insert white space as a sequence of characters, in
the manner of EMACS and EDT. For example:
top of argument
v
original The time has come to talk of many things.
Of mice and men and elephants.
^
bottom of argument
after insert The time h
as come to talk of many things.
Of mice and men and elephants.
Finally, insert may be used to edit the text of a text-argument.
Using the cursor keys to move within the argument, insert will open up
a space for one character. Remember that insert may not take an
argument itself while editing an argument.
Summary of sInsert (stream insert)
Insert one space.
Break line as if a carriage return were inserted.
Insert space in a stream.
quote
Control-X Control-N
Read the next character typed literally and insert it into the input
stream. With this command any ascii character can be inserted into
a buffer or searched for.
Summary of Quote
char Insert any character into buffer or argument.
Insert Line
Control-L
Inserts a blank line by moving every line from the cursor to the end
of the buffer down one line. It will insert many blank lines if given
a box argument. The name insert line does not describe all it can do,
however. With a box argument, insert will open up the area of the
argument by moving columns to the right. To illustrate:
top of argument
v
The time has come to talk of many things.
Of mice and men and elephants.
^
bottom of argument
Result after "line" insert:
The time h as come to talk of many things.
Of mice an d men and elephants.
Notice that the two lines are now six characters longer. A null
argument has another special function: it moves the first non-blank
character in a line to be under the cursor (granted, this is strange,
but it is useful for getting indentation correct). For example:
null argument
v
before linsert The time has come to talk of many things.
after linsert The time has come to talk of many things.
If meta is set, then the linsert will erase the text currently in the
file. If meta were set in the above example, the result would be:
The time h e to talk of many things.
Of mice an and elephants.
The result is the same size as the original, but six columns in the
middle have been erased.
Summary of lInsert (line insert)
Insert one line under the cursor.
line Insert number of lines given in argument.
box Insert blanks into box by moving columns right.
... Erase the text in the argument.
Put
Control-P
This command inserts into the buffer a copy of the last argument
deleted or picked. If the last argument was a line argument, then
lines are inserted; if it was a box argument, a box is inserted; and
if it was a stream, then a stream is inserted. If put is given a
single argument, it first picks its argument and then inserts it. A
text argument inserts the text. Avoiding insert mode and using
text is the easiest way to reduce the "insert mode shuffle"
where the rest of the line is rewritten after every keystroke.
When modified by meta, put will overwrite the new text on the buffer,
rather than insert it.
Summary of Get (copy text into pick buffer)
Insert last text deleted or picked.
Picks next word and inserts it?
text Insert text.
box Pick box, then insert it.
... Overwrite the buffer with put text.
Get
Control-G
Get inserts information into the buffer. What is inserted is completely
context dependent: It inserts the last block of text that was deleted
or picked. Get can be used a number of times to place multiple copies
of the block into the file. If get is given an argument, it first
picks the argument, and then gets it back: a copy is inserted into
the file. If get is modified by meta, destructively replaces the new
text block on top of what is currently in the buffer. A text argument
causes get to insert the text. Arg-arg get places a number of copies
of the block into the buffer.
Summary of Put (put text into buffer)
Insert saved block into buffer
box Pick box and then insert it
text Insert text
num Insert saved block a number of times
... Overlay saved block onto buffer
Sdelete - <>
This command will delete the character which is under the cursor. All
the characters to the right of the cursor move to the left one space,
and the cursor stays in the same place. In this example delete
character is used twice (the cursor is represented by the arrow).
v
original The time has come to talk of many things.
after first delete The time has cme to talk of many things.
after second delete The time has ce to talk of many things.
Modified with a null argument, the command deletes the rest of the
line, brings the next line up to the cursor. This two line example
may make this "splice" more clear.
v
original with arg The time has come to talk of many things.
Of mice and men and elephants.
after delete The time Of mice and men and elephants.
A stream argument deletes a sequence of characters, in the manner
of EMACS and EDT. For example:
top of argument
v
original The time has come to talk of many things.
Of mice and men and elephants.
^
bottom of argument
after delete The time and elephants.
Finally, delete may be used to edit the text of a text-argument.
Using the cursor keys to move within the argument, delete will remove
one character.
Summary of sDelete (stream delete)
Delete one character, and discard it.
Delete characters in stream, save in
save in pick buffer.
Delete Line - ldelete - <>
Control-U
Removed one line from the buffer, and moves every line below it up one
line It will delete numerous lines if given a box argument. The name
delete line does not describe all it can do, however. With a box
argument, delete will remove arbitrary rectangles from the buffer. To
illustrate:
top of argument
V
The time has come to talk of many things.
Of mice and men and elephants.
^
bottom of argument
Result after "line" delete:
The time he to talk of many things.
Of mice anand elephants.
Notice that the two lines are now six characters shorter. A null
argument has another special function: it deletes from the
cursor to the end of the line.
null argument
v
before ldelete The time has come to talk of many things.
after ldelete The time has com
If meta is set, then the ldelete will append the deleted text to the
end of the last pick buffer. A subsequent would then insert the
combination of two deletes.
Summary of lDelete (line delete)
Delete one line under the cursor.
Delete number of lines given in argument.
Delete rectangle of text and save in buffer.
... Append deleted text to last delete buffer.
Bdelete - <>
Deletes previous character from buffer, and moves the rest of the line
to the left one position. This command is also used to edit text
arguments, so it can not take an argument itself. Note that the
character is not saved in the delete buffer; so it cannot be restored
automatically.
Summary of bDelete (back delete)
Delete previous character from file.
Delword - <>
Deletes the previous word from the buffer. A word is defined to be a
block of non-blank characters. Puts the word into the delete buffer.
Modified by meta, delword appends the word to the delete buffer.
Summary of Delword
Delete previous word from buffer.
... Delete word and append to delete buffer.
Psearch - <>
Msearch - <>
This command searches for a pattern, starting with the cursor, and
going either forwards, toward the end of the file, or backwards,
toward the top of file. The cursor points to the beginning of the
closest occurrence of the pattern, and the window is moved to enclose
the cursor (scroll switches may affect the window). A text argument
is used as the search pattern. If no argument is given, search will
use the last pattern entered. The search string may also be taken
from the buffer, as the next word on the line, by modifying the search
with a null argument. During a typical search, Z ignores the case of
letters: for example, "ThIs" will match "tHiS" when searching.
One can also search for regular expressions. Regular expressions
involve iteration, selection, and sequencing of other patterns.
Regular expressions are specified by the following syntax:
try and match the patterns from left to right
p* match a sequence of zero or more occurrences of p
~p fail if the pattern matches at this location
[l-u] matches a range of characters
\c match character explicitly
For example, " *\(", will search for C keywords.
Regular expression search is invoked by double arg.
Summary of pSearch (plus search) and mSearch (minus search)
Search for same pattern as last search
Search for string taken from buffer
text Search for text
pat Search for regular expression
... Inverts the value of ignorecase for one search
Switches related to search
ignorecase If this switch is set to false, Z will distinguish the
case of letters, so only an exact match will succeed.
Replace - <>
Qreplace - <>
Replaces all occurrences of a string, the search string, with another
string, the replacement string. Replace always prompts for the search
string and the replacement string. The previous entries are kept and
used as a base the new search and replacement. One can keep the same
string, or edit it using the arrows and insert/delete character
functions. If the input is terminated with Carriage Return, the
entire string is used, while Arg (PF1) marks the cursor position as
the end of the input.
A line or box argument specifies the range of the replacement. If
The search string is not the same length as the replacement string,
the relative position of columns may change. This is only a problem
when using a box argument, because a string that should be replaced
may be moved out of the box.
Query replace acts the same as replace but in addition asks whether to
do the replacement on each occurrence of the search string. There are
three possible responses: Yes, 'y', replace this occurrence. No,
'n', do not replace this occurrence. Proceed, 'p', Replace this and
all future occurrences without prompting.
Summary of Replace and qReplace
All forms prompt for search and replacement strings, giving previous
input as an editing base. Terminate input with carriage return to use
all of input line, and break input at cursor position.
Perform replacement over entire buffer.
Perform replacement only in box
... Temporarily invert setting of ignore case switch.
Switches related to Replace
ignorecase If this switch is set to false, Z will distinguish the
case of letters, so only an exact match will succeed.
Chgbuf - <>
Z can load in several files at one time, though only one can be edited
at a time (but two files can be displayed simultaneously, see SPLIT).
The chgbuf command is used to load files, switch between files, or
back up a file. To load a second file, simply enter the name of the
file as a text argument, and then the chgbuf command. If the file
exists, Z will read it in. If it does not exist, then you have the
option of creating the file.
The chgbuf command without a argument will switch to the previous
buffer. Note that nothing is lost when one changes files from within
Z: all files that were changed will be saved at the end of the
session, and chunks of text picked or deleted from one file may be
inserted into another.
One may also save the current file with double argument chgbuf.
Summary of Chgbuf (change buffer)
Switch to previous file.
Load named file, or create if not found.
Save the current file.
Switches related to buffers
autosave Z will save a copy of a file after a certain number of
changes. The autosave switch sets this limit. To
completely disable autosave, set the switch to 0. The
default value is 500.
entab When Z saves a file, it converts runs of spaces at the
beginning of a line to tabs; when it reads a file it
converts tabs into spaces. Setting entab to
false with disable this behavior. Z then becomes much
more like EDT.
maxtemp This is the maximum number of files on which Z will save
information. It defaults to seven. To see its affect,
look at the file "z.tmp" in your directory.
Split - <>
Control-X Control-A, PF4
Splits the screen into two windows, or switches between these windows.
This command interprets its text argument as the name of a file to put
into the other window (it is slightly problematic if the file does not
exist). After the window is in two parts, the split command will jump
from one window to the other. To go back to single window mode,
precede split with a null argument.
Summary of Split
When the screen has a single window:
Split screen to previous buffer.
Split screen and put named file in other half.
When the screen contains two windows:
Jump to other window, or
Return to single window displaying current buffer.
Switches related to split
splitsize Percent of screen height occupied by upper window.
Don't change this while the screen is split.
Delete Buffer - <>
Deletes current buffer and frees up all the space it occupies in
memory WITHOUT SAVING ANY CHANGES. Because the effect of this command
cannot be reversed, you are prompted to make sure you want to delete
the buffer.
Summary of DelBuf (delete buffer)
Delete buffer with verification.
Position - <>
Position is used to jump to specific locations in a buffer. Without
an argument, position moves the window back to its previous location.
One can also put the cursor on a particular line by giving position a
line argument. A box argument jumps to a particular line and column.
One can also set bookmarks using position. A bookmark is a name for a
location, and can be named as the far corner of a later box, line, or
stream argument. A new bookmark gives the spot the cursor is on a
symbolic name, used as shorthand for its line, column coordinates. If
a bookmark is mentioned and it already exists, position will jump to
that named location, even if it is in another file.
The autobookmark switch will define bookmarks on every C, Lisp, or
Pascal function when the file is read in. Then one can jump to any
routine by name.
Summary of position (position location)
Jump to previous window.
Jump to top of buffer.
Jump to beginning of a particular line.
Jump to stated line and column.
name Define bookposition if new name,
or jump to old bookposition.
Switches related to Position
NOT YET IMPLEMENTED
automark When loading a file, if automark is on, and the file
is C, Lisp, or Pascal, a bookmark is defined for
each function, if it matches the following patterns:
C ^~ %*(%*)$
Lisp ^(defun
Pascal ^
Balance - <>
Searches from the cursor position toward the top of the buffer,
looking for an open parenthetic character: (), [], or {}. If the
unmatched character is within the current window, the cursor will
jump for one second to that character. If it is off the window, the
line containing the character will be printed on the message portion
of the status line. If balance is preceded by an argument, it cause
the cursor to rest on the matching open parenthesis. Also, if closing
character is not already there, then it will be inserted.
Summary of Balance
Finds a matching unclosed parenthetic character.
Finds match and leaves cursor on open symbol.
Fill - <>
Fills in text to form paragraphs between right an left margins. A
paragraph will be made out of each group of lines separated by at
least one blank line. The lines will be broken apart or filled in as
necessary so the enclosed text fits between the right and left
margins. If there is a blank line before the newly formed paragraph
and the indent switch is set (see below) then the first line of the
paragraph will be indented. Any punctuation followed by at least one
space will be modified to have exactly two spaces after it. If no
argument is given, the current cursor position is used as the left
margin. The right margin is taken from the rmargin switch. A line
argument will fill several paragraphs. A box will define both left
and right margins for the fill.
Some examples of the behavior of fill are given below.
Example before Fill.
The moving finger writes,
and having writ
Moves on.
Nor all your
piety and wit can call it back to cancel half a line.
Nor all your
tears wash out a word of it.
Example after Fill.
The moving finger writes, and having
writ Moves on. Nor all your piety and
wit can call it back to cancel half a
line. Nor all your tears wash out a
word of it.
Meta Fill will break text up into sentences, one per line.
Sentences begin after punctuation and end with puntuation.
Example after Meta Fill.
The moving finger writes, and having
writ Moves on.
Nor all your piety and wit can call it
back to cancel half a line.
Nor all your tears wash out a word of
it.
Summary of Fill
Fill the paragraph from the current location to
the next blank line. Set the left margin to be
the current column.
Fill the enclosed lines. Set the left margin to
be the current column.
Fill the enclosed lines. Set the left and
right margins to the left and right sides of
the argument, respectivly.
... Seperate the enclosed text into sentences, one
per line.
Upper - <>
Lower - <>
Converts all alphabetic characters on current line to upper or lower
case. A box or line argument only affects letters in the range of the
argument. A null argument changes case from cursor to the end of the
current line.
Summary of Upper or Lower
Change case of line.
Change case of rest of line.
Change case of characters in box.
##EXPAND THESE INTO SEPERATE DEFINITIONS
Center
Control-X Control-C
Flush Right
Control-X R
Flush Left
Control-X L
Either center, right allign, or left allign, the text within
a box. Center uses the lmargin and rmargin switches if no
argument is given.
Summary of Center, FlushRight, and FLushLeft
Center current line between left and right margins.
Center text between left and right sides of box.
Setswitch - <>
[see z.doc on switch files]
Change the value of a switch or keyboard function assignment. If a
text argument is given it will be used otherwise you will be prompted
for the switch name. The change should take the form:
switchname = value
or
string : definition
Summary of Setswitch
Prompt for new switch defintion.
Define new switch value.
Showswitch - <>
[see z.doc on switch files]
Shows the value of a switch. If you don't give a text argument, you
will be prompted for the switch name. Note that command input
mappings cannot be displayed using showswitch.
Summary of Showswitch
Prompt for name and display switch value.
Display switch value.
Showmap - <>
This command shows a map of what commands are located on which
character sequences. The map will appear in a temporary buffer that
cannot be saved. The commands are in a suitable format to be picked
and placed into a z.ini file.
New commands can be added to the map and switch values can be changed
by making the appropriate changes to the buffer. To get Z to reread
the changes that you have made just repeat the showmap command. If
any changes have been made to the buffer then the appropriate commands
and switches will be changed internally and the buffer will be updated
to reflect the changes. To turn off a character sequence, just place
the word "no_name" in the place of the command on the right hand side
of the ':' character in the definition.
^a:advance CHANGED TO ^a:no_name
would turn off ^a. From then on, whenever a Control-a was typed, a
Control-a would be inserted into your program, instead of performing
the advance command.
Zexit - <>
Exit from Z, saving all files. NOTE: since Z does not save files all
the time, or maintain a temporary buffer, there is some danger that
your directory will fill up while performing the exit function. Z
will save all files under a temporary name, and only when the save is
complete will it rename the file to its proper name.
Summary of Zexit
Save all files and return to monitor level.
Cancel - <>
Cancels an argument. This command is rather weak in this
implementation of Z because input is not interrupt driven. Hence
Cancel cannot stop a runaway search or replace command. To exit from
Z without saving files, you must type Cancel six times. Note that
this can be very dangerous, because Z will not continue.
Summary of Cancel
Abort any partial command.
Switches related to Cancel
maxcancel This switch defines the number of times one must cancel
before Z will exit. It defaults to 9.
Arg
PF1, double escape, double Control-[
Arg starts an argument, by placing a diamond under the cursor. Don't
be alarmed, it is not really in your file. At that point you have
several options: enter a command immediately, which is known as a
null argument; type in some characters to form text argument; move
the cursor down for a line argument; or move the cursor anywhere to
form a stream or box argument. Note that arguments are always
interpreted by the command which terminates them. That is, some
commands expect text arguments, and will take text out of the buffer
if you don't type any in; some commands expect stream arguments, and
will try to parse the text if you type a text argument.
Summary of Arg
Its really too comprehensive to summarize, but one hint is
Control-C cancels an infant arg. An entire section in this
document is devoted to explainging how args work.
Toggle - <>
Invert the value of the insert mode switch. New characters typed on
top of old characters normally erase the old, and take their places in
the buffer. But when Z is in insert mode, characters are spliced into
the line, and the old characters are moved to the right. So you know
if you are in insert mode, Z puts an asterisk right after the
coordinates on the status line.
Summary of Toggle
Toggle Z in and out of insert mode.
Zinfo - <>
Prints date and time on status line. With an argument, information
on buffer names and sizes are shown. The bottom of the display is
a list of the first line of the five last deletes or picks.
Summary of Zinfo
Gives date and time.
Buffer information.
Help - <>
Loads portions of z.doc relevant to a command. Type any command to
get help on that command.
Summary of Help
Display information on command.
Push - <>
Creates a process and attaches it to your terminal. Keeps Z around
with any files it might have. Under VMS Typing ^C while in the
spawned exec will cause Z to exit abnormally upon return from the
subprocess. to return to Z, just log out of the spawned process.
Summary of Push
Create a new sub-process and attach to it.
Rotate - <>
Rotates the list of the last five saved deletes or picks. A pick
buffer must be at the top of the pick list in order for the next GET
command to retrieve its contents. To see the buffers rotate, use
.
INTERNALS AND PORTABILITY
1) One problem area in Z has to do with the expansion of wild cards in
file names. VMS provides a system call expressly for this purpose.
The easiest way to do this on UNIX might be to do pattern matching
against directory entries.
2) Terminal initialization is naturally a problem when moving to a new
operating system.
3) Mail handling.
Porting Z to VMS. No problem.
Porting Z to UNIX.
1) findfile is totally different.
2) file name format is expected to be [], not //.