xref: /minix/external/bsd/nvi/docs/help (revision 84d9c625)
1*84d9c625SLionel SambucMOVING THE CURSOR:
2*84d9c625SLionel Sambuc k - cursor up    ^F - page forward	       /<pattern><CR> - search forward
3*84d9c625SLionel Sambuc j - cursor down  ^B - page backward	       ?<pattern><CR> - search backward
4*84d9c625SLionel Sambuc h - cursor left   w - move forward a "word"   n - repeat the last search
5*84d9c625SLionel Sambuc l - cursor right  b - move backward a "word"
6*84d9c625SLionel Sambuc
7*84d9c625SLionel SambucENTERING TEXT:
8*84d9c625SLionel Sambuca - append after the cursor.             Use the <escape> key to return to
9*84d9c625SLionel Sambuci - insert before the cursor.            command mode.
10*84d9c625SLionel Sambuco - open a new line below the cursor.
11*84d9c625SLionel SambucO - open new line above the cursor.
12*84d9c625SLionel Sambuc
13*84d9c625SLionel SambucWRITING AND EXITING:
14*84d9c625SLionel Sambuc:w<Enter>  - write the file
15*84d9c625SLionel Sambuc:q<Enter>  - exit the file
16*84d9c625SLionel Sambuc:q!<Enter> - exit without writing the file
17*84d9c625SLionel Sambuc:#<Enter>  - move to a line (e.g., :35<Enter> moves to line 35)
18*84d9c625SLionel Sambuc
19*84d9c625SLionel SambucMISCELLANEOUS:
20*84d9c625SLionel Sambuc^G - display the file name
21*84d9c625SLionel Sambuc J - join two lines (use i<Enter><escape> to split a line)
22*84d9c625SLionel Sambuc u - undo the last change (enter . after a 'u' to undo more than one change)
23*84d9c625SLionel Sambuc
24*84d9c625SLionel Sambuc=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
25*84d9c625SLionel SambucVI COMMANDS:
26*84d9c625SLionel Sambuc	^A search forward for cursor word
27*84d9c625SLionel Sambuc	^B scroll up by screens
28*84d9c625SLionel Sambuc	^C interrupt an operation (e.g. read, write, search)
29*84d9c625SLionel Sambuc	^D scroll down by half screens (setting count)
30*84d9c625SLionel Sambuc	^E scroll down by lines
31*84d9c625SLionel Sambuc	^F scroll down by screens
32*84d9c625SLionel Sambuc	^G file status
33*84d9c625SLionel Sambuc	^H move left by characters
34*84d9c625SLionel Sambuc	^J move down by lines
35*84d9c625SLionel Sambuc	^L redraw screen
36*84d9c625SLionel Sambuc	^M move down by lines (to first non-blank)
37*84d9c625SLionel Sambuc	^N move down by lines
38*84d9c625SLionel Sambuc	^P move up by lines
39*84d9c625SLionel Sambuc	^R redraw screen
40*84d9c625SLionel Sambuc	^T tag pop
41*84d9c625SLionel Sambuc	^U half page up (set count)
42*84d9c625SLionel Sambuc	^V input a literal character
43*84d9c625SLionel Sambuc	^W move to next screen
44*84d9c625SLionel Sambuc	^Y page up by lines
45*84d9c625SLionel Sambuc	^Z suspend editor
46*84d9c625SLionel Sambuc	^[ <escape> exit input mode, cancel partial commands
47*84d9c625SLionel Sambuc	^\ switch to ex mode
48*84d9c625SLionel Sambuc	^] tag push cursor word
49*84d9c625SLionel Sambuc	^^ switch to previous file
50*84d9c625SLionel Sambuc   <space> move right by columns
51*84d9c625SLionel Sambuc	 ! filter through command(s) to motion
52*84d9c625SLionel Sambuc	 # number increment/decrement
53*84d9c625SLionel Sambuc	 $ move to last column
54*84d9c625SLionel Sambuc	 % move to match
55*84d9c625SLionel Sambuc	 & repeat substitution
56*84d9c625SLionel Sambuc	 ' move to mark (to first non-blank)
57*84d9c625SLionel Sambuc	 ( move back sentence
58*84d9c625SLionel Sambuc	 ) move forward sentence
59*84d9c625SLionel Sambuc	 + move down by lines (to first non-blank)
60*84d9c625SLionel Sambuc	 , reverse last F, f, T or t search
61*84d9c625SLionel Sambuc	 - move up by lines (to first non-blank)
62*84d9c625SLionel Sambuc	 . repeat the last command
63*84d9c625SLionel Sambuc	 / search forward
64*84d9c625SLionel Sambuc	 0 move to first character
65*84d9c625SLionel Sambuc	 : ex command
66*84d9c625SLionel Sambuc	 ; repeat last F, f, T or t search
67*84d9c625SLionel Sambuc	 < shift lines left to motion
68*84d9c625SLionel Sambuc	 > shift lines right to motion
69*84d9c625SLionel Sambuc	 ? search backward
70*84d9c625SLionel Sambuc	 @ execute buffer
71*84d9c625SLionel Sambuc	 A append to the line
72*84d9c625SLionel Sambuc	 B move back bigword
73*84d9c625SLionel Sambuc	 C change to end-of-line
74*84d9c625SLionel Sambuc	 D delete to end-of-line
75*84d9c625SLionel Sambuc	 E move to end of bigword
76*84d9c625SLionel Sambuc	 F character in line backward search
77*84d9c625SLionel Sambuc	 G move to line
78*84d9c625SLionel Sambuc	 H move to count lines from screen top
79*84d9c625SLionel Sambuc	 I insert before first nonblank
80*84d9c625SLionel Sambuc	 J join lines
81*84d9c625SLionel Sambuc	 L move to screen bottom
82*84d9c625SLionel Sambuc	 M move to screen middle
83*84d9c625SLionel Sambuc	 N reverse last search
84*84d9c625SLionel Sambuc	 O insert above line
85*84d9c625SLionel Sambuc	 P insert before cursor from buffer
86*84d9c625SLionel Sambuc	 Q switch to ex mode
87*84d9c625SLionel Sambuc	 R replace characters
88*84d9c625SLionel Sambuc	 S substitute for the line(s)
89*84d9c625SLionel Sambuc	 T before character in line backward search
90*84d9c625SLionel Sambuc	 U Restore the current line
91*84d9c625SLionel Sambuc	 W move to next bigword
92*84d9c625SLionel Sambuc	 X delete character before cursor
93*84d9c625SLionel Sambuc	 Y copy line
94*84d9c625SLionel Sambuc	ZZ save file and exit
95*84d9c625SLionel Sambuc	[[ move back section
96*84d9c625SLionel Sambuc	]] move forward section
97*84d9c625SLionel Sambuc	 ^ move to first non-blank
98*84d9c625SLionel Sambuc	 _ move to first non-blank
99*84d9c625SLionel Sambuc	 ` move to mark
100*84d9c625SLionel Sambuc	 a append after cursor
101*84d9c625SLionel Sambuc	 b move back word
102*84d9c625SLionel Sambuc	 c change to motion
103*84d9c625SLionel Sambuc	 d delete to motion
104*84d9c625SLionel Sambuc	 e move to end of word
105*84d9c625SLionel Sambuc	 f character in line forward search
106*84d9c625SLionel Sambuc	 h move left by columns
107*84d9c625SLionel Sambuc	 i insert before cursor
108*84d9c625SLionel Sambuc	 j move down by lines
109*84d9c625SLionel Sambuc	 k move up by lines
110*84d9c625SLionel Sambuc	 l move right by columns
111*84d9c625SLionel Sambuc	 m set mark
112*84d9c625SLionel Sambuc	 n repeat last search
113*84d9c625SLionel Sambuc	 o append after line
114*84d9c625SLionel Sambuc	 p insert after cursor from buffer
115*84d9c625SLionel Sambuc	 r replace character
116*84d9c625SLionel Sambuc	 s substitute character
117*84d9c625SLionel Sambuc	 t before character in line forward search
118*84d9c625SLionel Sambuc	 u undo last change
119*84d9c625SLionel Sambuc	 w move to next word
120*84d9c625SLionel Sambuc	 x delete character
121*84d9c625SLionel Sambuc	 y copy text to motion into a cut buffer
122*84d9c625SLionel Sambuc	 z reposition the screen
123*84d9c625SLionel Sambuc	 { move back paragraph
124*84d9c625SLionel Sambuc	 | move to column
125*84d9c625SLionel Sambuc	 } move forward paragraph
126*84d9c625SLionel Sambuc	 ~ reverse case
127*84d9c625SLionel Sambuc=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
128*84d9c625SLionel SambucEX COMMANDS:
129*84d9c625SLionel Sambuc	  ^D: scroll lines
130*84d9c625SLionel Sambuc	   !: filter lines through commands or run commands
131*84d9c625SLionel Sambuc	   #: display numbered lines
132*84d9c625SLionel Sambuc	   &: repeat the last subsitution
133*84d9c625SLionel Sambuc	   *: execute a buffer
134*84d9c625SLionel Sambuc	   <: shift lines left
135*84d9c625SLionel Sambuc	   =: display line number
136*84d9c625SLionel Sambuc	   >: shift lines right
137*84d9c625SLionel Sambuc	   @: execute a buffer
138*84d9c625SLionel Sambuc      append: append input to a line
139*84d9c625SLionel Sambuc  abbreviate: specify an input abbreviation
140*84d9c625SLionel Sambuc	args: display file argument list
141*84d9c625SLionel Sambuc	  bg: background the current screen
142*84d9c625SLionel Sambuc      change: change lines to input
143*84d9c625SLionel Sambuc	  cd: change the current directory
144*84d9c625SLionel Sambuc       chdir: change the current directory
145*84d9c625SLionel Sambuc	copy: copy lines elsewhere in the file
146*84d9c625SLionel Sambuc      cscope: create a set of tags using a cscope command
147*84d9c625SLionel Sambuc      delete: delete lines from the file
148*84d9c625SLionel Sambuc     display: display buffers, screens or tags
149*84d9c625SLionel Sambuc     [Ee]dit: begin editing another file
150*84d9c625SLionel Sambuc       [Ee]x: begin editing another file
151*84d9c625SLionel Sambuc     exusage: display ex command usage statement
152*84d9c625SLionel Sambuc	file: display (and optionally set) file name
153*84d9c625SLionel Sambuc	  fg: switch the current screen and a backgrounded screen
154*84d9c625SLionel Sambuc      global: execute a global command on lines matching an RE
155*84d9c625SLionel Sambuc	help: display help statement
156*84d9c625SLionel Sambuc      insert: insert input before a line
157*84d9c625SLionel Sambuc	join: join lines into a single line
158*84d9c625SLionel Sambuc	   k: mark a line position
159*84d9c625SLionel Sambuc	list: display lines in an unambiguous form
160*84d9c625SLionel Sambuc	move: move lines elsewhere in the file
161*84d9c625SLionel Sambuc	mark: mark a line position
162*84d9c625SLionel Sambuc	 map: map input or commands to one or more keys
163*84d9c625SLionel Sambuc      mkexrc: write a .exrc file
164*84d9c625SLionel Sambuc     [Nn]ext: edit (and optionally specify) the next file
165*84d9c625SLionel Sambuc      number: change display to number lines
166*84d9c625SLionel Sambuc	open: enter "open" mode (not implemented)
167*84d9c625SLionel Sambuc       print: display lines
168*84d9c625SLionel Sambuc	perl: run the perl interpreter with the command
169*84d9c625SLionel Sambuc      perldo: run the perl interpreter with the command, on each line
170*84d9c625SLionel Sambuc    preserve: preserve an edit session for recovery
171*84d9c625SLionel Sambuc [Pp]revious: edit the previous file in the file argument list
172*84d9c625SLionel Sambuc	 put: append a cut buffer to the line
173*84d9c625SLionel Sambuc	quit: exit ex/vi
174*84d9c625SLionel Sambuc	read: append input from a command or file to the line
175*84d9c625SLionel Sambuc     recover: recover a saved file
176*84d9c625SLionel Sambuc      resize: grow or shrink the current screen
177*84d9c625SLionel Sambuc      rewind: re-edit all the files in the file argument list
178*84d9c625SLionel Sambuc	   s: substitute on lines matching an RE
179*84d9c625SLionel Sambuc      script: run a shell in a screen
180*84d9c625SLionel Sambuc	 set: set options (use ":set all" to see all options)
181*84d9c625SLionel Sambuc       shell: suspend editing and run a shell
182*84d9c625SLionel Sambuc      source: read a file of ex commands
183*84d9c625SLionel Sambuc	stop: suspend the edit session
184*84d9c625SLionel Sambuc     suspend: suspend the edit session
185*84d9c625SLionel Sambuc	   t: copy lines elsewhere in the file
186*84d9c625SLionel Sambuc      [Tt]ag: edit the file containing the tag
187*84d9c625SLionel Sambuc     tagnext: move to the next tag
188*84d9c625SLionel Sambuc      tagpop: return to the previous group of tags
189*84d9c625SLionel Sambuc     tagprev: move to the previous tag
190*84d9c625SLionel Sambuc      tagtop: discard all tags
191*84d9c625SLionel Sambuc	 tcl: run the tcl interpreter with the command
192*84d9c625SLionel Sambuc	undo: undo the most recent change
193*84d9c625SLionel Sambucunabbreviate: delete an abbreviation
194*84d9c625SLionel Sambuc       unmap: delete an input or command map
195*84d9c625SLionel Sambuc	   v: execute a global command on lines NOT matching an RE
196*84d9c625SLionel Sambuc     version: display the program version information
197*84d9c625SLionel Sambuc      visual: enter visual (vi) mode from ex mode
198*84d9c625SLionel Sambuc   [Vv]isual: edit another file (from vi mode only)
199*84d9c625SLionel Sambuc     viusage: display vi key usage statement
200*84d9c625SLionel Sambuc       write: write the file
201*84d9c625SLionel Sambuc	  wn: write the file and switch to the next file
202*84d9c625SLionel Sambuc	  wq: write the file and exit
203*84d9c625SLionel Sambuc	 xit: exit
204*84d9c625SLionel Sambuc	yank: copy lines to a cut buffer
205*84d9c625SLionel Sambuc	   z: display different screens of the file
206*84d9c625SLionel Sambuc	   ~: replace previous RE with previous replacement string,
207*84d9c625SLionel Sambuc=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
208*84d9c625SLionel SambucEdit options:
209*84d9c625SLionel Sambucnoaltwerase     filec=""        nomodeline      scroll=17       notildeop
210*84d9c625SLionel Sambucautoindent      flash           msgcat="./"     nosearchincr    timeout
211*84d9c625SLionel Sambucautoprint       hardtabs=0      noprint=""      nosecure        nottywerase
212*84d9c625SLionel Sambucnoautowrite     noiclower       nonumber        shiftwidth=8    noverbose
213*84d9c625SLionel Sambucbackup=""       noignorecase    nooctal         noshowmatch     warn
214*84d9c625SLionel Sambucnobeautify      keytime=6       open            noshowmode      window=35
215*84d9c625SLionel Sambuccedit=""        noleftright     optimize        sidescroll=16   nowindowname
216*84d9c625SLionel Sambuccolumns=80      lines=36        print=""        noslowopen      wraplen=0
217*84d9c625SLionel Sambuccomment         nolisp          prompt          nosourceany     wrapmargin=0
218*84d9c625SLionel Sambucnoedcompatible  nolist          readonly        tabstop=8       wrapscan
219*84d9c625SLionel Sambucescapetime=1    lock            noredraw        taglength=0     nowriteany
220*84d9c625SLionel Sambucnoerrorbells    magic           remap           tags="tags"
221*84d9c625SLionel Sambucexrc            matchtime=7     report=5        term="xterm"
222*84d9c625SLionel Sambucnoextended      mesg            ruler           noterse
223*84d9c625SLionel Sambuccdpath="/usr/src/local/nvi:/tmp"
224*84d9c625SLionel Sambucdirectory="/tmp"
225*84d9c625SLionel Sambucmatchchars="[]{}()<>"
226*84d9c625SLionel Sambucparagraphs="IPLPPPQPP LIpplpipbp"
227*84d9c625SLionel Sambucrecdir="/var/tmp/vi.recover"
228*84d9c625SLionel Sambucsections="NHSHH HUnhsh"
229*84d9c625SLionel Sambucshell="/bin/csh"
230*84d9c625SLionel Sambucshellmeta="~{[*?$`'"\"
231