16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

line is a ). When a line ends with white space, vi retains the white space,<br />

does not add any further spaces, and then appends the next line.<br />

p Same as p except that text is pasted before the cursor instead of after it.<br />

P Put buffer contents before the cursor. Also called a paste operation. If<br />

preceded by quote buffername (for example, “b), the contents of that buffer<br />

are used; otherwise the contents of the unnamed buffer are used. If the<br />

buffer was created in ex mode, the contents of the buffer are inserted<br />

before the current line. If the buffer was created in vi mode, the contents<br />

are inserted before the cursor. As a special case, if a paste operation is<br />

repeated with the period (.) command and it used a numbered buffer, the<br />

number of the buffer is incremented. Thus, “1p ..., pastes in the contents of<br />

buffer 1 through buffer 6; in other words the last six things that were deleted<br />

are put back.<br />

Q Switches to ex mode. You leave vi mode and the ex prompt is shown on<br />

the bottom line of the screen.<br />

U Undoes all changes to current line. As soon as you move off a line or<br />

invoke an ex command on the line, the original contents of the line are<br />

forgotten and U is not successful.<br />

u Undoes last change. If repeated, you undo the undo (that is, go back to<br />

what the text was before the undo). Some operations are treated as single<br />

changes; for example, everything done by a global G is undone with undo.<br />

ZZ Writes the file out, if changed, and then exits.<br />

. Repeats the last command. Any command that changes the contents of the<br />

file can be repeated by this command. If you do not specify count with the .<br />

command, vi uses the count that was specified for the command being<br />

repeated.<br />

~ Toggles the case of the character under the cursor and moves the cursor<br />

right by one. This command can be preceded by count to change the case<br />

of count characters.<br />

& Repeats the previous ex substitute command, using the current line as the<br />

target. Flags set by the previous command are ignored. Equivalent to the<br />

ex command &.<br />

: Invokes a single ex command. The editor places the cursor on the bottom<br />

line of the screen and displays a colon (:) to prompt for input. You can then<br />

type one or more ex commands; when you press ESC or a RETURN, the<br />

line you have entered is passed to ex and executed there.<br />

@ Invokes a macro. When the next character is a letter from a through z, vi<br />

treats it as the name of a buffer. The contents of that buffer are treated as<br />

input typed to vi. The text of a macro may contain an @ calling another<br />

macro. A macro may call itself, provided it is invoked at the end of the<br />

macro (tail recursion). Such a macro executes forever or until an error<br />

occurs or the INTERRUPT key is pressed. A macro that invokes itself at the<br />

beginning (head recursion) loops until it runs out of memory. A vi error<br />

terminates all currently executing macros. All changes made during a macro<br />

call are treated as a unit and may be undone with a single u command.<br />

= Reindents the specified line as though they were set via lisp and<br />

autoindent-set, if the lisp option was specified.<br />

vi<br />

Chapter 2. Shell command descriptions 767

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!