

















keys
	COMMAND MODE
	
	Ctrl-B			Page Up							 Alt-C				Copy
	Ctrl-C			Toggle Case Sens.		 Alt-D				Delete Block
	Ctrl-D			Half Page Up				 Alt-F				Display File Name
	Ctrl-E			Scroll Up						 Alt-H				Help
	Ctrl-F			Page Down						 Alt-K				Cut
	Ctrl-H			Left								 Alt-M				Mark
	Ctrl-I			Next Tab Stop				 Alt-O				Print
	Ctrl-J			Down								 Alt-P				Paste
	Ctrl-K			Up									 Alt-X				Return to BRIEF
	Ctrl-L			Right								 Enter				Nonwhite, Next Line
	Ctrl-P			Playback						 Ctrl-Enter	Nonwhite, Previous Line
	Ctrl-R			Remember						 Space				Right
	Ctrl-U			Half Page Down			 Backspace		Left
	Ctrl-Y			Scroll Down					 Tab					Next Tab Stop
	Ctrl-Z			Suspend Session			 Shift-Tab		Back Tab
	PgDn ==> Next Page
	
	Home				Top of Window				 End					End of Line
	PgUp				Page Up							 PgDn				Page Down
	Left				Left								 Shift-Up		Change Window
	Right				Right								 Shift-Down			"
	Up					Up									 Shift-Left			"
	Down				Down								 Shift-Right			"
	Ins					Insert Mode					 Del					Delete Character
																	 
	0 					Beginning of Line		 $						End of Line
	" 					Select Scrap Buffer	 % 					Delimiter Match
	+ 					Nonwhite, Next Line	 - 					Nonwhite, Previous Line
	< 					Outdent Lines				 >						Indent Lines
	^ 					First Nonwhite			 |						Go to Column
	` 					Go to Bookmark			 ' 					Go to Bookmark (Nonwhite)
	\ 					Set Tab Stops				 						Toggle Case
	: 					Extended Command		 @ 					Execute Command
	PgDn ==> Next PagePgUp ==> Previous Page
	
	, 					Reverse Char Search	 ;						Repeat Char Search
	/ 					String Search Fwd		 ? 					String Search Back
																	 
	A 					Append at EOL				 a 					Append at Cursor
	B 					Previous Word Alpha	 b 					Previous Word
	C 					Change to EOL				 c 					Change (operator)
	D 					Delete to EOL				 d 					Delete (operator)
	E 					End of Word Alpha		 e 					End of Word
	F 					Char Search Back		 f 					Char Search Fwd
	G 					Go to Line					 g 					Go to Line
	H 					Top of Window				 h 					Left
	I 					Insert at Nonwhite	 i 					Insert Mode
	J 					Join Lines					 j 					Down
																	 k 					Up
	L 					End of Window				 l 					Right
	M 					Middle of Window		 m 					Drop Bookmark
	PgDn ==> Next PagePgUp ==> Previous Page
	
	N 					Reverse String Searchn 					Repeat String Search
	O 					Open Line Above			 o 					Open Line Below
	P 					Paste Before Cursor	 p 					Paste After Cursor
	R 					Replace Mode				 r 					Replace Character
	S 					Substitute Lines		 s 					Substitute Characters
	T 					Char Before Back		 t 					Char Before Forward
	U 					Undo								 u 					Undo
	W 					Next Word Alpha			 w 					Next Word
	X 					Delete Previous Char x 					Delete Next Char
	Y 					Yank Lines					 y 					Yank (operator)
	ZZ					Save, then Quit			 z<Enter>		Line to Top of Window
	z.					Line to Middle			 z-					Line to Bottom
																	 
																	 
																	 
																	 
	PgDn ==> Next PagePgUp ==> Previous Page
	INSERT MODE												REPLACE MODE
	
	Esc					Command Mode				 Esc					Command Mode
																	 
	Tab					Space to Tab Stop		 
	Shift-Tab		Destructive Back Tab 
																	 Backspace		Undo
																	 
	Enter				New Line						 Enter				New Line
	Left				Left								 Left				Left
	Right				Right								 Right				Right
																	 
																	 
																	 
																	 
																	 
																	 
	PgUp ==> Previous Page
extendedvi_command
	EXTENDED COMMANDS
	:a					Toggle auto-indent	 :t	<str>		Set tabs
	:b					Buffer list					 :w					Write file
	:d					Delete window				 :w <str>		Write to new file
	:e <str>		Edit file						 :wq					Write, then quit
	:k <str>		Delete macro file		 :w! <str>		Overwrite file
	:l <str>		Load macro file			 :x					Exit immediately
	:m					Move (resize) window :! <str>		Run DOS command
	:n					Next buffer					 :!!					Repeat last DOS command
	:o					Open new window			 
	:q					Quit (no changes)		 
	:q!					Quit (cancel changes)
	:r <str>		Read file						 
	:s/<str1>/<str2>/g		Global replace
	:s/<str1>/<str2>/p		Query replace
	:s/<str1>/<str2>/			Replace
																	 
	
copy,cut,mark,paste,printblocks

	Copy, Cut, Mark, Paste, and Print work exactly as they do outside
	the emulator; that is, with normal marks and the regular scrap.

	In VI, block operations are more commonly performed by using
	operators in conjunction with cursor movement commands.  For
	example, y$ will copy everything from the cursor to the end of the
	line to the scrap.  (y is the yank operator; $ is the end-of-line
	command.)  See Operators for a description of the operators and the
	commands they work with.

	Block operations normally use the regular scrap, but may also use
	a separate named scrap.  Names may be any letter or digit, and
	(along with a quote) precede the command.  For example, "a8x will
	cut the next 8 characters to the scrap buffer named a.

	PgDn ==> Next Page


	These additional commands will work with named scraps:

	[n]p						Paste (n times) after cursor
	[n]P						Paste at cursor
	[n]s						Substitute characters (cut, then insert)
	[n]S						Substitute lines
	[n]x						Cut the next n characters
	[n]X						Cut the last n characters







																								PgUp ==> Previous Page

files
	Here are the buffer- and file-related commands:

	   :a						Toggle auto-indent mode
	   :b						Buffer list
	   :e <str>			Edit file
	   :n						Next buffer
	   :q						Quit (no changes made)
	   :q!					Quit (cancel changes)
	   :r <str>			Read file into current buffer
	   :t	<str>			Set tabs for current buffer
	[n]\						Set tabs (default = every 3 columns)
	   :wq					Write, then quit
	   ZZ						Write, then quit
	   :w						Write changes to file
	   :w <str>			Write to new file
	   :w! <str>		Overwrite file
	   :x						Exit immediately

miscellaneousvi_markvi_repl_char

  [n]<						Indent lines by a tab
  [n]>						Outdent lines by a tab
	[n]~						Change case of current character
	[n]J						Join line with the next
	[n]r<char>			Replace n characters with <char>
	   m<char>			Drop bookmark (char must be a digit)
	   u 						Undo
	   xp						Reverse the order of the next two characters
	   :k <str>			Delete macro file
	   :l <str>			Load macro file
	   @<str>				Execute command
	   <Ctrl-P>			Playback
	   <Ctrl-R>			Remember
	   <Ctrl-Z>			Suspend session
	   :! <str>			Run DOS command
	   :!!					Repeat last DOS command (3 character minimum)

vi_ins,vi_rep,vi_returnmodes
	Unlike BRIEF, VI has three "modes": command mode, insert mode, and
	replace (overstrike) mode.  Insert and replace are used just to
	enter text; to do anything more sophisticated, you have to get back
	into command mode first.  On the other hand, in command mode,
	everything you type is interpreted as a command rather than as a
	direct change to the buffer.

	The keys normally used to switch modes are as follows (note that
	there is no direct way between insert and replace modes):

	<COMMAND> to <INSERT>						i
	<INSERT> to <COMMAND>						<Esc>

	<COMMAND> to <REPLACE>					R
	<REPLACE> to <COMMAND>					<Esc>

	PgDn ==> Next Page

	The following commands also may be used to enter insert mode:

	   a						Append (insert after cursor)
	   A						Append to end of line
	   c						Change (see Operators)
	   C						Change to end of line
	   I						Insert at first non-white character after cursor
	   o						Open blank line below current
	   O						Open blank line above current
	[n]s						Substitute characters (delete, then insert)
	[n]S						Substitute lines


	Command mode is the default when VI emulation is invoked.  To
	return from it to the normal BRIEF environment, use <Alt-X>.

																								PgUp ==> Previous Page

movingvi_do_mark 0vi_do_mark 1


	[n]<Ctrl-B>			Page up
	[n]<Ctrl-D>			Half page down
	[n]<Ctrl-E>			Scroll up one line
	[n]<Ctrl-F>			Page down
	[n]<Ctrl-H>			Cursor left
	[n]<Ctrl-I>			Next tab stop
	[n]<Shift-Tab>	Previous tab stop
	[n]<Ctrl-J>			Cursor down
	[n]<Ctrl-K>			Cursor up
	[n]<Ctrl-L>			Cursor right
	[n]<Ctrl-U>			Half page up
	[n]<Ctrl-Y>			Scroll down one line


	PgDn ==> Next Page


	   0						Beginning of line
	   $						End of line
	   ^						First non-white character on line
	[n]+						First non-white on next line
	[n]-						First non-white on previous line
	[n]|						Go to numbered column (defaults to beginning of line)
	[n]G						Go to numbered line (defaults to end of file)
	[n]H						Top of window or # lines below it
	[n]M						Middle of window or # lines below it
	[n]L						Bottom of window or # lines before it
	   z<Enter>			Line to top of window
	   z.						Line to middle of window
		 z-						Line to bottom of window


	PgDn ==> Next Page														PgUp ==> Previous Page



	[n]w						Next word (delimited by white space)
	[n]W						Next word (delimited by alphanumeric)
	[n]b						Previous word (white space)
	[n]B						Previous word (alphanumeric)
	[n]e						End of word (white space)
	[n]E						End of word (alphanumeric)

	   `<char>			Go to bookmark (char must be a digit)
	   '<char>			Go to first non-white character before bookmark





																								PgUp ==> Previous Page

operators

	In VI, cutting and copying are called deleting and "yanking".
	VI also supports "changing", which is deleting followed by
	entering insert mode.  These operations are generally performed
	by specifying the delete, change, or yank operator, and then
	specifying a cursor movement command.  A temporary mark is dropped,
	the cursor is moved, and the operation is done to the marked block.

	The basic operators are:

	   d						Delete (cut)
	   c						Change (cut and insert)
	   y						Yank (copy)

	There are shorthand commands for the commonest operations:

	PgDn ==> Next Page


	   D						Delete to end of line
	[n]dd						Delete n lines
	   C						Change to end of line
	[n]cc						Change to the end of the nth line
	[n]Y						Yank lines
	[n]yy						Yank lines

	For example, to cut four lines to the scrap, you could use 4dd.
	(You may use a named scrap; see "Blocks" for more information.)

	Cursor movement commands that may be preceded by an operator
	include beginning of line, end of line, and first non-white
	character on line; go to line; the word movement commands; and
	the go to bookmark commands.



prefixes


	Many VI commands may be prefixed by a repeat count.  For example,
  4<Ctrl-Y> will scroll down four lines instead of the usual one.
	These commands are indicated throughout this help menu by the
	notation [n] prefacing the command itself.

	VI has additional prefixes that modify commands.  For a description
	of operators that instruct a command to act on a particular region
	(line, word, marked area, etc.), see "Operators".  For a description
	of commands that accept the name of a scrap buffer, see "Blocks".







searchingvi_srch_backvi_srch_fwdvi_search

	[n]/<str>				String search forward
	[n]?<str>				String search backward
	[n]n						Repeat search
	[n]N						Repeat search in reverse direction
	   %			 			Find matching (), {} or []
	   <Ctrl-C>			Toggle case sensitivity
	[n]f<char>			Character search forward
	[n]F<char>			Character search backward
	[n]t<char>			Find character before <char>
	[n]T<char>			Backward search for character before <char>
	[n];						Repeat f,F,t or T
	[n],						Reverse repeat of f,F,t or T

	   :s/<str1>/<str2>/g			Replace (global)
	   :s/<str1>/<str2>/p			Replace (prompted)
	   :s/<str1>/<str2>/ 			Replace (single)

windows

	   :o						Open new window
	   :d						Delete window
	   :m						Move (resize) window
	   <Shift-Up>		Move to window in appropriate direction
	   <Shift-Down>
	   <Shift-Left>
	   <Shift-Right>











