9 E
\bEx
\bx/
\b/V
\bVi
\bi R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be M
\bMa
\ban
\bnu
\bua
\bal
\bl
11 _
\bK_
\be_
\bi_
\bt_
\bh _
\bB_
\bo_
\bs_
\bt_
\bi_
\bc
13 Computer Science Division
14 Department of Electrical Engineering and Computer Science
15 University of California, Berkeley
16 Berkeley, California 94720
22 _
\bA_
\bb_
\bs_
\bt_
\br_
\ba_
\bc_
\bt
27 This document is the reference guide for the 4.4BSD
28 implementations of n
\bne
\bex
\bx/n
\bnv
\bvi
\bi, which are reimplementations
29 of the historic Berkeley e
\bex
\bx/v
\bvi
\bi editors.
35 _
\bA_
\bc_
\bk_
\bn_
\bo_
\bw_
\bl_
\be_
\bd_
\bg_
\be_
\bm_
\be_
\bn_
\bt_
\bs
40 Bruce Englar encouraged the early development of
41 the historic e
\bex
\bx/v
\bvi
\bi editor. Peter Kessler helped bring
42 sanity to version 2's command layout. Bill Joy wrote
43 versions 1 and 2.0 through 2.7, and created the frame-
44 work that users see in the present editor. Mark Horton
45 added macros and other features and made e
\bex
\bx/v
\bvi
\bi work on a
46 large number of terminals and Unix systems.
48 N
\bNv
\bvi
\bi is originally derived from software contributed
49 to the University of California, Berkeley by Steve Kirk-
50 endall, the author of the v
\bvi
\bi clone e
\bel
\blv
\bvi
\bis
\bs.
52 IEEE Standard Portable Operating System Interface
53 for Computer Environments (POSIX) 1003.2 style Regular
54 Expression support was done by Henry Spencer.
56 The curses library was originally done by Ken
57 Arnold. Scrolling and reworking for n
\bnv
\bvi
\bi was done by
74 The Institute of Electrical and Electronics Engi-
75 neers has given us permission to reprint portions of
76 their documentation. Portions of this document are
77 reprinted and reproduced from IEEE Std 1003.2-1992, IEEE
78 Standard Portable Operating System Interface for Comput-
79 er Environments (POSIX), copyright 1992 by the Institute
80 of Electrical and Electronics Engineers, Inc.
82 The financial support of UUNET Communications Ser-
83 vices is gratefully acknowledged.
137 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-3
\b3
140 1
\b1.
\b. D
\bDe
\bes
\bsc
\bcr
\bri
\bip
\bpt
\bti
\bio
\bon
\bn
142 V
\bVi
\bi is a screen oriented text editor. E
\bEx
\bx is a line-
143 oriented text editor. E
\bEx
\bx and v
\bvi
\bi are different interfaces to
144 the same program, and it is possible to switch back and
145 forth during an edit session. V
\bVi
\bie
\bew
\bw is the equivalent of
146 using the -
\b-R
\bR (read-only) option of v
\bvi
\bi.
148 This reference manual is the one provided with the
149 n
\bne
\bex
\bx/n
\bnv
\bvi
\bi versions of the e
\bex
\bx/v
\bvi
\bi text editors. N
\bNe
\bex
\bx/n
\bnv
\bvi
\bi are
150 intended as bug-for-bug compatible replacements for the
151 original Fourth Berkeley Software Distribution (4BSD) e
\bex
\bx/v
\bvi
\bi
152 programs. This reference manual is accompanied by a tradi-
153 tional-style manual page. That manual page describes the
154 functionality found in e
\bex
\bx/v
\bvi
\bi in far less detail than the
155 description here. In addition, it describes the system
156 interface to e
\bex
\bx/v
\bvi
\bi, e.g. command line options, session
157 recovery, signals, environmental variables, and similar
160 This reference is intended for users already familiar
161 with e
\bex
\bx/v
\bvi
\bi. Anyone else should almost certainly read a good
162 tutorial on the editor first. If you are in an unfamiliar
163 environment, and you absolutely have to get work done imme-
164 diately, see the section entitled "F
\bFa
\bas
\bst
\bt S
\bSt
\bta
\bar
\brt
\btu
\bup
\bp" in the man-
165 ual page. It is probably enough to get you started.
167 There are a few features in n
\bne
\bex
\bx/n
\bnv
\bvi
\bi that are not found
168 in historic versions of e
\bex
\bx/v
\bvi
\bi. Some of the more interesting
169 of those features are briefly described in the section enti-
170 tled "A
\bAd
\bdd
\bdi
\bit
\bti
\bio
\bon
\bna
\bal
\bl F
\bFe
\bea
\bat
\btu
\bur
\bre
\bes
\bs" near the end of this document.
171 For the rest of this document, n
\bne
\bex
\bx/n
\bnv
\bvi
\bi is used only when it
172 is necessary to distinguish it from the historic implementa-
173 tions of e
\bex
\bx/v
\bvi
\bi.
175 Future versions of this software will be periodically
176 made available by anonymous ftp, and can be retrieved from
177 f
\bft
\btp
\bp.
\b.c
\bcs
\bs.
\b.b
\bbe
\ber
\brk
\bke
\bel
\ble
\bey
\by.
\b.e
\bed
\bdu
\bu, in the directory u
\buc
\bcb
\bb/
\b/4
\b4b
\bbs
\bsd
\bd.
179 2
\b2.
\b. S
\bSt
\bta
\bar
\brt
\btu
\bup
\bp I
\bIn
\bnf
\bfo
\bor
\brm
\bma
\bat
\bti
\bio
\bon
\bn
181 E
\bEx
\bx/v
\bvi
\bi interprets one of two possible environmental
182 variables and reads up to three of five possible files dur-
183 ing startup. The variables and files are expected to con-
184 tain e
\bex
\bx commands, not v
\bvi
\bi commands. In addition, they are
185 interpreted _
\bb_
\be_
\bf_
\bo_
\br_
\be the file to be edited is read, and there-
186 fore many e
\bex
\bx commands may not be used. Generally, any com-
187 mand that requires output to the screen or that needs a file
188 upon which to operate, will cause an error if included in a
189 startup file or environmental variable.
191 Because the e
\bex
\bx command set supported by n
\bne
\bex
\bx/n
\bnv
\bvi
\bi is a
192 superset of the command set supported by most historical
203 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-4
\b4 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be
206 implementations of e
\bex
\bx, n
\bne
\bex
\bx/n
\bnv
\bvi
\bi can use the startup files
207 created for the historical implementations, but the converse
210 If the -
\b-s
\bs (the historic - option) is specified, or if
211 standard input is redirected from a file, all environmental
212 variables and startup files are ignored.
214 Otherwise, startup files and environmental variables
215 are handled in the following order:
217 (1) The file /
\b/e
\bet
\btc
\bc/
\b/v
\bvi
\bi.
\b.e
\bex
\bxr
\brc
\bc is read, as long as it is owned
218 by root or the effective user ID of the user.
220 (2) The environmental variable N
\bNE
\bEX
\bXI
\bIN
\bNI
\bIT
\bT (or the variable
221 E
\bEX
\bXI
\bIN
\bNI
\bIT
\bT, if N
\bNE
\bEX
\bXI
\bIN
\bNI
\bIT
\bT is not set) is interpreted.
223 (3) If neither N
\bNE
\bEX
\bXI
\bIN
\bNI
\bIT
\bT or E
\bEX
\bXI
\bIN
\bNI
\bIT
\bT was set, and the H
\bHO
\bOM
\bME
\bE
224 environmental variable is set, the file $
\b$H
\bHO
\bOM
\bME
\bE/
\b/.
\b.n
\bne
\bex
\bxr
\brc
\bc
225 (or the file $
\b$H
\bHO
\bOM
\bME
\bE/
\b/.
\b.e
\bex
\bxr
\brc
\bc, if $
\b$H
\bHO
\bOM
\bME
\bE/
\b/.
\b.n
\bne
\bex
\bxr
\brc
\bc does not
226 exist) is read, as long as the effective user ID of
227 the user is root or is the same as the owner of the
230 (4) If the e
\bex
\bxr
\brc
\bc option was turned on by one of the previ-
231 ous startup information sources, the file .
\b.n
\bne
\bex
\bxr
\brc
\bc (or
232 the file .
\b.e
\bex
\bxr
\brc
\bc, if .
\b.n
\bne
\bex
\bxr
\brc
\bc does not exist) is read, as
233 long as the effective user ID of the user is the same
234 as the owner of the file.
236 No startup file is read if it is writable by anyone
237 other than its owner.
239 It is not an error for any of the startup environmental
240 variables or files not to exist.
242 Once all environmental variables are interpreted, and
243 all startup files are read, the first file to be edited is
244 read in (or a temporary file is created). Then, any com-
245 mands specified using the -
\b-c
\bc option are executed, in the
246 context of that file.
248 3
\b3.
\b. R
\bRe
\bec
\bco
\bov
\bve
\ber
\bry
\by
250 There is no recovery program for n
\bne
\bex
\bx/n
\bnv
\bvi
\bi, nor does
251 n
\bne
\bex
\bx/n
\bnv
\bvi
\bi run setuid. Recovery files are created readable and
252 writable by the owner only. Users may recover any file
253 which they can read, and the superuser may recover any edit
256 Edit sessions are backed by files in the directory
257 named by the r
\bre
\bec
\bcd
\bdi
\bir
\br option (the directory
258 /
\b/v
\bva
\bar
\br/
\b/t
\btm
\bmp
\bp/
\b/v
\bvi
\bi.
\b.r
\bre
\bec
\bco
\bov
\bve
\ber
\br by default), and are named "v
\bvi
\bi.
\b.X
\bXX
\bXX
\bXX
\bXX
\bXX
\bX",
269 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-5
\b5
272 where "X
\bXX
\bXX
\bXX
\bXX
\bXX
\bX" is a number related to the process ID. When
273 a file is first modified, a second recovery file containing
274 an email message for the user is created, and is named
275 "r
\bre
\bec
\bco
\bov
\bve
\ber
\br.
\b.X
\bXX
\bXX
\bXX
\bXX
\bXX
\bX", where, again, "X
\bXX
\bXX
\bXX
\bXX
\bXX
\bX" is associated with
276 the process ID. Both files are removed at the end of a nor-
277 mal edit session, but will remain if the edit session is
278 abnormally terminated or the user runs the e
\bex
\bx p
\bpr
\bre
\bes
\bse
\ber
\brv
\bve
\be com-
281 The r
\bre
\bec
\bcd
\bdi
\bir
\br option may be set in either the user's or
282 system's startup information, changing the recovery direc-
283 tory. (Note, however, that if a memory based file system is
284 used as the backup directory, each system reboot will delete
285 all of the recovery files! The same caution applies to
286 directories such as /
\b/t
\btm
\bmp
\bp which are cleared of their contents
287 by a system reboot, or /
\b/u
\bus
\bsr
\br/
\b/t
\btm
\bmp
\bp which is periodically
288 cleared of old files on many systems.)
290 The recovery directory should be owned by root, or at
291 least by a pseudo-user. In addition, if directory "sticky-
292 bit" semantics are available, the directory should have the
293 sticky-bit set so that files may only be removed by their
294 owners. The recovery directory must be read, write, and
295 executable by any user, i.e. mode 1777.
297 If the recovery directory does not exist, e
\bex
\bx/v
\bvi
\bi will
298 attempt to create it. This can result in the recovery
299 directory being owned by a normal user, which means that
300 that user will be able to remove other user's recovery and
301 backup files. This is annoying, but is not a security issue
302 as the user cannot otherwise access or modify the files.
304 The recovery file has all of the necessary information
305 in it to enable the user to recover the edit session. In
306 addition, it has all of the necessary email headers for
307 _
\bs_
\be_
\bn_
\bd_
\bm_
\ba_
\bi_
\bl(8). When the system is rebooted, all of the files
308 in /
\b/v
\bva
\bar
\br/
\b/t
\btm
\bmp
\bp/
\b/v
\bvi
\bi.
\b.r
\bre
\bec
\bco
\bov
\bve
\ber
\br named "r
\bre
\bec
\bco
\bov
\bve
\ber
\br.
\b.X
\bXX
\bXX
\bXX
\bXX
\bXX
\bX" should be sent
309 to their owners, by email, using the -
\b-t
\bt option of s
\bse
\ben
\bnd
\bdm
\bma
\bai
\bil
\bl
310 (or a similar mechanism in other mailers). If e
\bex
\bx/v
\bvi
\bi
311 receives a hangup (SIGHUP) signal, or the user executes the
312 e
\bex
\bx p
\bpr
\bre
\bes
\bse
\ber
\brv
\bve
\be command, e
\bex
\bx/v
\bvi
\bi will automatically email the
313 recovery information to the user.
315 If your system does not have the s
\bse
\ben
\bnd
\bdm
\bma
\bai
\bil
\bl utility (or a
316 mailer program which supports its interface) the source file
317 n
\bnv
\bvi
\bi/
\b/c
\bco
\bom
\bmm
\bmo
\bon
\bn/
\b/r
\bre
\bec
\bco
\bov
\bve
\ber
\br.
\b.c
\bc will have to be modified to use your
318 local mail delivery programs. Note, if n
\bne
\bex
\bx/n
\bnv
\bvi
\bi is changed
319 to use another mailer, it is important to remember that the
320 owner of the file given to the mailer is the n
\bne
\bex
\bx/n
\bnv
\bvi
\bi user,
321 so nothing in the file should be trusted as it may have been
322 modified in an effort to compromise the system.
335 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-6
\b6 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be
338 Finally, the owner execute bit is set on backup files
339 when they are created, and unset when they are first modi-
340 fied, e.g. backup files that have no associated email recov-
341 ery file will have this bit set. (There is also a small
342 window where empty files can be created and not yet have
343 this bit set. This is due to the method in which the files
344 are created.) Such files should be deleted when the system
347 A simple way to do this cleanup is to insert the fol-
348 lowing Bourne shell script into your /
\b/e
\bet
\btc
\bc/
\b/r
\brc
\bc.
\b.l
\blo
\boc
\bca
\bal
\bl (or other
349 startup) file. The script should work with the historic
350 Bourne shell, a POSIX 1003.2 shell or the Korn shell. (A
351 copy of this script is included as
352 n
\bnv
\bvi
\bi/
\b/i
\bin
\bns
\bst
\bta
\bal
\bll
\bl/
\b/r
\bre
\bec
\bco
\bov
\bve
\ber
\br.
\b.s
\bsc
\bcr
\bri
\bip
\bpt
\bt in the n
\bne
\bex
\bx/n
\bnv
\bvi
\bi distribution.)
401 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-7
\b7
404 #
\b# @
\b@(
\b(#
\b#)
\b)r
\bre
\bec
\bco
\bov
\bve
\ber
\br.
\b.s
\bsc
\bcr
\bri
\bip
\bpt
\bt 8
\b8.
\b.7
\b7 (
\b(B
\bBe
\ber
\brk
\bke
\bel
\ble
\bey
\by)
\b) 8
\b8/
\b/1
\b16
\b6/
\b/9
\b94
\b4
406 #
\b# S
\bSc
\bcr
\bri
\bip
\bpt
\bt t
\bto
\bo r
\bre
\bec
\bco
\bov
\bve
\ber
\br n
\bnv
\bvi
\bi e
\bed
\bdi
\bit
\bt s
\bse
\bes
\bss
\bsi
\bio
\bon
\bns
\bs.
\b.
408 R
\bRE
\bEC
\bCD
\bDI
\bIR
\bR=
\b=/
\b/v
\bva
\bar
\br/
\b/t
\btm
\bmp
\bp/
\b/v
\bvi
\bi.
\b.r
\bre
\bec
\bco
\bov
\bve
\ber
\br
409 S
\bSE
\bEN
\bND
\bDM
\bMA
\bAI
\bIL
\bL=
\b=/
\b/u
\bus
\bsr
\br/
\b/l
\bli
\bib
\bb/
\b/s
\bse
\ben
\bnd
\bdm
\bma
\bai
\bil
\bl
410 e
\bec
\bch
\bho
\bo '
\b'R
\bRe
\bec
\bco
\bov
\bve
\ber
\bri
\bin
\bng
\bg n
\bnv
\bvi
\bi e
\bed
\bdi
\bit
\bto
\bor
\br s
\bse
\bes
\bss
\bsi
\bio
\bon
\bns
\bs.
\b.'
\b'
412 #
\b# C
\bCh
\bhe
\bec
\bck
\bk e
\bed
\bdi
\bit
\bto
\bor
\br b
\bba
\bac
\bck
\bku
\bup
\bp f
\bfi
\bil
\ble
\bes
\bs.
\b.
413 v
\bvi
\bib
\bba
\bac
\bck
\bku
\bup
\bp=
\b=`
\b`e
\bec
\bch
\bho
\bo $
\b$R
\bRE
\bEC
\bCD
\bDI
\bIR
\bR/
\b/v
\bvi
\bi.
\b.*
\b*`
\b`
414 i
\bif
\bf [
\b[ "
\b"$
\b$v
\bvi
\bib
\bba
\bac
\bck
\bku
\bup
\bp"
\b" !
\b!=
\b= "
\b"$
\b$R
\bRE
\bEC
\bCD
\bDI
\bIR
\bR/
\b/v
\bvi
\bi.
\b.*
\b*"
\b" ]
\b];
\b; t
\bth
\bhe
\ben
\bn
415 f
\bfo
\bor
\br i
\bi i
\bin
\bn $
\b$v
\bvi
\bib
\bba
\bac
\bck
\bku
\bup
\bp;
\b; d
\bdo
\bo
416 #
\b# O
\bOn
\bnl
\bly
\by t
\bte
\bes
\bst
\bt f
\bfi
\bil
\ble
\bes
\bs t
\bth
\bha
\bat
\bt a
\bar
\bre
\be r
\bre
\bea
\bad
\bda
\bab
\bbl
\ble
\be.
\b.
417 i
\bif
\bf t
\bte
\bes
\bst
\bt !
\b! -
\b-r
\br $
\b$i
\bi;
\b; t
\bth
\bhe
\ben
\bn
418 c
\bco
\bon
\bnt
\bti
\bin
\bnu
\bue
\be
421 #
\b# U
\bUn
\bnm
\bmo
\bod
\bdi
\bif
\bfi
\bie
\bed
\bd n
\bnv
\bvi
\bi e
\bed
\bdi
\bit
\bto
\bor
\br b
\bba
\bac
\bck
\bku
\bup
\bp f
\bfi
\bil
\ble
\bes
\bs e
\bei
\bit
\bth
\bhe
\ber
\br h
\bha
\bav
\bve
\be t
\bth
\bhe
\be
422 #
\b# e
\bex
\bxe
\bec
\bcu
\but
\bte
\be b
\bbi
\bit
\bt s
\bse
\bet
\bt o
\bor
\br a
\bar
\bre
\be z
\bze
\ber
\bro
\bo l
\ble
\ben
\bng
\bgt
\bth
\bh.
\b. D
\bDe
\bel
\ble
\bet
\bte
\be t
\bth
\bhe
\bem
\bm.
\b.
423 i
\bif
\bf t
\bte
\bes
\bst
\bt -
\b-x
\bx $
\b$i
\bi -
\b-o
\bo !
\b! -
\b-s
\bs $
\b$i
\bi;
\b; t
\bth
\bhe
\ben
\bn
429 #
\b# I
\bIt
\bt i
\bis
\bs p
\bpo
\bos
\bss
\bsi
\bib
\bbl
\ble
\be t
\bto
\bo g
\bge
\bet
\bt i
\bin
\bnc
\bco
\bom
\bmp
\bpl
\ble
\bet
\bte
\be r
\bre
\bec
\bco
\bov
\bve
\ber
\bry
\by f
\bfi
\bil
\ble
\bes
\bs,
\b, i
\bif
\bf t
\bth
\bhe
\be e
\bed
\bdi
\bit
\bto
\bor
\br c
\bcr
\bra
\bas
\bsh
\bhe
\bes
\bs
430 #
\b# a
\bat
\bt t
\bth
\bhe
\be r
\bri
\big
\bgh
\bht
\bt t
\bti
\bim
\bme
\be.
\b.
431 v
\bvi
\bir
\bre
\bec
\bco
\bov
\bve
\ber
\bry
\by=
\b=`
\b`e
\bec
\bch
\bho
\bo $
\b$R
\bRE
\bEC
\bCD
\bDI
\bIR
\bR/
\b/r
\bre
\bec
\bco
\bov
\bve
\ber
\br.
\b.*
\b*`
\b`
432 i
\bif
\bf [
\b[ "
\b"$
\b$v
\bvi
\bir
\bre
\bec
\bco
\bov
\bve
\ber
\bry
\by"
\b" !
\b!=
\b= "
\b"$
\b$R
\bRE
\bEC
\bCD
\bDI
\bIR
\bR/
\b/r
\bre
\bec
\bco
\bov
\bve
\ber
\br.
\b.*
\b*"
\b" ]
\b];
\b; t
\bth
\bhe
\ben
\bn
433 f
\bfo
\bor
\br i
\bi i
\bin
\bn $
\b$v
\bvi
\bir
\bre
\bec
\bco
\bov
\bve
\ber
\bry
\by;
\b; d
\bdo
\bo
434 #
\b# O
\bOn
\bnl
\bly
\by t
\bte
\bes
\bst
\bt f
\bfi
\bil
\ble
\bes
\bs t
\bth
\bha
\bat
\bt a
\bar
\bre
\be r
\bre
\bea
\bad
\bda
\bab
\bbl
\ble
\be.
\b.
435 i
\bif
\bf t
\bte
\bes
\bst
\bt !
\b! -
\b-r
\br $
\b$i
\bi;
\b; t
\bth
\bhe
\ben
\bn
436 c
\bco
\bon
\bnt
\bti
\bin
\bnu
\bue
\be
439 #
\b# D
\bDe
\bel
\ble
\bet
\bte
\be a
\ban
\bny
\by r
\bre
\bec
\bco
\bov
\bve
\ber
\bry
\by f
\bfi
\bil
\ble
\bes
\bs t
\bth
\bha
\bat
\bt a
\bar
\bre
\be z
\bze
\ber
\bro
\bo l
\ble
\ben
\bng
\bgt
\bth
\bh,
\b, c
\bco
\bor
\brr
\bru
\bup
\bpt
\bte
\bed
\bd,
\b,
440 #
\b# o
\bor
\br t
\bth
\bha
\bat
\bt h
\bha
\bav
\bve
\be n
\bno
\bo c
\bco
\bor
\brr
\bre
\bes
\bsp
\bpo
\bon
\bnd
\bdi
\bin
\bng
\bg b
\bba
\bac
\bck
\bku
\bup
\bp f
\bfi
\bil
\ble
\be.
\b. E
\bEl
\bls
\bse
\be s
\bse
\ben
\bnd
\bd m
\bma
\bai
\bil
\bl
441 #
\b# t
\bto
\bo t
\bth
\bhe
\be u
\bus
\bse
\ber
\br.
\b.
442 r
\bre
\bec
\bcf
\bfi
\bil
\ble
\be=
\b=`
\b`a
\baw
\bwk
\bk '
\b'/
\b/^
\b^X
\bX-
\b-v
\bvi
\bi-
\b-r
\bre
\bec
\bco
\bov
\bve
\ber
\br-
\b-p
\bpa
\bat
\bth
\bh:
\b:/
\b/{
\b{p
\bpr
\bri
\bin
\bnt
\bt $
\b$2
\b2}
\b}'
\b' <
\b< $
\b$i
\bi`
\b`
443 i
\bif
\bf t
\bte
\bes
\bst
\bt -
\b-n
\bn "
\b"$
\b$r
\bre
\bec
\bcf
\bfi
\bil
\ble
\be"
\b" -
\b-a
\ba -
\b-s
\bs "
\b"$
\b$r
\bre
\bec
\bcf
\bfi
\bil
\ble
\be"
\b";
\b; t
\bth
\bhe
\ben
\bn
444 $
\b$S
\bSE
\bEN
\bND
\bDM
\bMA
\bAI
\bIL
\bL -
\b-t
\bt <
\b< $
\b$i
\bi
453 If you are not using the default value for the r
\bre
\bec
\bcd
\bdi
\bir
\br
454 option, be sure to substitute the value you're using for the
455 R
\bRE
\bEC
\bCD
\bDI
\bIR
\bR value in the recovery script.
467 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-8
\b8 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be
470 If the path of your system's s
\bse
\ben
\bnd
\bdm
\bma
\bai
\bil
\bl program (or what-
471 ever mailer you're using) is not /
\b/u
\bus
\bsr
\br/
\b/l
\bli
\bib
\bb/
\b/s
\bse
\ben
\bnd
\bdm
\bma
\bai
\bil
\bl, be sure
472 to substitute the correct pathname for the S
\bSE
\bEN
\bND
\bDM
\bMA
\bAI
\bIL
\bL value in
473 the recovery script. Consult the manual page for details on
474 recovering preserved or aborted editing sessions.
476 4
\b4.
\b. S
\bSi
\biz
\bzi
\bin
\bng
\bg t
\bth
\bhe
\be S
\bSc
\bcr
\bre
\bee
\ben
\bn
478 The size of the screen can be set in a number of ways.
479 E
\bEx
\bx/v
\bvi
\bi takes the following steps until values are obtained
480 for both the number of rows and number of columns in the
483 (1) If the environmental variable L
\bLI
\bIN
\bNE
\bES
\bS exists, it is
484 used to specify the number of rows in the screen.
486 (2) If the environmental variable C
\bCO
\bOL
\bLU
\bUM
\bMN
\bNS
\bS exists, it is
487 used to specify the number of columns in the screen.
489 (3) The TIOCGWINSZ _
\bi_
\bo_
\bc_
\bt_
\bl(2) is attempted on the standard
490 error file descriptor.
492 (4) The termcap entry (or terminfo entry on System V
493 machines) is checked for the "li" entry (rows) and
494 the "co" entry (columns).
496 (5) The number of rows is set to 24, and the number of
497 columns is set to 80.
499 If a window change size signal (SIGWINCH) is received,
500 the new window size is retrieved using the TIOCGWINSZ
501 _
\bi_
\bo_
\bc_
\bt_
\bl(2) call, and all other information is ignored.
503 5
\b5.
\b. C
\bCh
\bha
\bar
\bra
\bac
\bct
\bte
\ber
\br D
\bDi
\bis
\bsp
\bpl
\bla
\bay
\by
505 In both e
\bex
\bx and v
\bvi
\bi printable characters as defined by
506 _
\bi_
\bs_
\bp_
\br_
\bi_
\bn_
\bt(3) are displayed using the local character set.
508 Non-printable characters, for which _
\bi_
\bs_
\bc_
\bn_
\bt_
\br_
\bl(3) returns
509 true, and which are less than octal \076, are displayed as
510 the string "^
\b^<
\b<c
\bch
\bha
\bar
\bra
\bac
\bct
\bte
\ber
\br>
\b>", where <
\b<c
\bch
\bha
\bar
\bra
\bac
\bct
\bte
\ber
\br>
\b> is the charac-
511 ter that is the original character's value offset from the
512 "@
\b@" character. For example, the octal character \001 is
513 displayed as "^
\b^A
\bA". If _
\bi_
\bs_
\bc_
\bn_
\bt_
\br_
\bl(3) returns true for the octal
514 character \177, it is displayed as the string "^
\b^?
\b?". All
515 other characters are displayed as either hexadecimal values,
516 in the form "0
\b0x
\bx<
\b<h
\bhi
\big
\bgh
\bh-
\b-h
\bha
\bal
\blf
\bfb
\bby
\byt
\bte
\be>
\b> .
\b..
\b..
\b. 0
\b0x
\bx<
\b<l
\blo
\bow
\bw-
\b-h
\bha
\bal
\blf
\bfb
\bby
\byt
\bte
\be>
\b>", or as
517 octal values, in the form "\
\b\<
\b<h
\bhi
\big
\bgh
\bh-
\b-o
\bon
\bne
\be-
\b-o
\bor
\br-
\b-t
\btw
\bwo
\bo-
\b-b
\bbi
\bit
\bts
\bs>
\b> .
\b..
\b..
\b.
518 \
\b\<
\b<l
\blo
\bow
\bw-
\b-t
\bth
\bhr
\bre
\bee
\be-
\b-b
\bbi
\bit
\bts
\bs>
\b>". The display of unknown characters is
519 based on the value of the o
\boc
\bct
\bta
\bal
\bl option.
521 In v
\bvi
\bi command mode, the cursor is always positioned on
522 the last column of characters which take up more than one
533 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-9
\b9
536 column on the screen. In v
\bvi
\bi text input mode, the cursor is
537 positioned on the first column of characters which take up
538 more than one column on the screen.
540 6
\b6.
\b. M
\bMu
\bul
\blt
\bti
\bip
\bpl
\ble
\be S
\bSc
\bcr
\bre
\bee
\ben
\bns
\bs
542 N
\bNv
\bvi
\bi supports multiple screens by dividing the window
543 into regions. It also supports stacks of screens by permit-
544 ting the user to change the set of screens that are cur-
547 The command s
\bsp
\bpl
\bli
\bit
\bt divides the current screen into two
548 regions of approximately equal size. If a list of files are
549 specified as arguments to the s
\bsp
\bpl
\bli
\bit
\bt command, the list of
550 files to be edited is initialized as if the n
\bne
\bex
\bxt
\bt command had
551 been used. If no files are specified, the new screen will
552 begin by editing the same file as the previous screen.
554 When more than one screen is editing a file, changes in
555 any screen are reflected in all other screens editing the
556 same file. Exiting any screen without saving any changes
557 (or explicitly discarding them) is permitted until the last
558 screen editing the file is exited.
560 The r
\bre
\bes
\bsi
\biz
\bze
\be command permits resizing of individual
561 screens. Screens may be grown, shrunk or set to an absolute
564 The ^
\b^W
\bW command is used to switch between screens. Each
565 ^
\b^W
\bW moves to the next lower screen in the window, or to the
566 first screen in the window if there are no lower screens.
568 The b
\bbg
\bg command "backgrounds" the current screen. The
569 screen disappears from the window, and the rows it occupied
570 are taken over by a neighboring screen. It is an error to
571 attempt to background the only screen in the window.
573 The d
\bdi
\bis
\bsp
\bpl
\bla
\bay
\by s
\bsc
\bcr
\bre
\bee
\ben
\bns
\bs command displays the names of the
574 files associated with the current backgrounded screens in
577 The f
\bfg
\bg [
\b[f
\bfi
\bil
\ble
\be]
\b] command "foregrounds" the first screen in
578 the list of backgrounded screens that is associated with its
579 argument. If no file argument is specified, the first
580 screen on the list is foregrounded. Foregrounding consists
581 of backgrounding the current screen, and replacing its space
582 in the window with the foregrounded screen.
584 If the last screen in the window is exited, and there
585 are backgrounded screens, the first screen on the list of
586 backgrounded screens takes over the window.
599 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-1
\b10
\b0 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be
602 7
\b7.
\b. R
\bRe
\beg
\bgu
\bul
\bla
\bar
\br E
\bEx
\bxp
\bpr
\bre
\bes
\bss
\bsi
\bio
\bon
\bns
\bs a
\ban
\bnd
\bd R
\bRe
\bep
\bpl
\bla
\bac
\bce
\bem
\bme
\ben
\bnt
\bt S
\bSt
\btr
\bri
\bin
\bng
\bgs
\bs
604 Regular expressions are used in line addresses, as the
605 first part of the e
\bex
\bx s
\bsu
\bub
\bbs
\bst
\bti
\bit
\btu
\but
\bte
\be, g
\bgl
\blo
\bob
\bba
\bal
\bl, and v
\bvg
\bgl
\blo
\bob
\bba
\bal
\bl com-
606 mands, and in search patterns.
608 The regular expressions supported by e
\bex
\bx/v
\bvi
\bi are, by
609 default, the Basic Regular Expressions (BRE's) described in
610 the IEEE POSIX Standard 1003.2. The e
\bex
\bxt
\bte
\ben
\bnd
\bde
\bed
\bd option causes
611 all regular expressions to be interpreted as the Extended
612 Regular Expressions (ERE's) described by the same standard.
613 (See _
\br_
\be_
\b__
\bf_
\bo_
\br_
\bm_
\ba_
\bt(7) for more information.) Generally speak-
614 ing, BRE's are the Regular Expressions found in _
\be_
\bd(1) and
615 _
\bg_
\br_
\be_
\bp(1), and ERE's are the Regular Expressions found in
616 _
\be_
\bg_
\br_
\be_
\bp(1).
618 The following is not intended to provide a description
619 of Regular Expressions. The information here only describes
620 strings and characters which have special meanings in the
621 e
\bex
\bx/v
\bvi
\bi version of RE's, or options which change the meanings
622 of characters that normally have special meanings in RE's.
624 (1) An empty RE (e.g. "/
\b//
\b/" or "?
\b??
\b?" is equivalent to the
627 (2) The construct "\
\b\<
\b<" matches the beginning of a word.
629 (3) The construct "\
\b\>
\b>" matches the end of a word.
631 (4) The character "~
\b~" matches the replacement part of the
632 last s
\bsu
\bub
\bbs
\bst
\bti
\bit
\btu
\but
\bte
\be command.
634 When the m
\bma
\bag
\bgi
\bic
\bc option is _
\bn_
\bo_
\bt set, the only characters
635 with special meanings are a "^
\b^" character at the beginning
636 of an RE, a "$
\b$" character at the end of an RE, and the
637 escaping character "\
\b\". The characters ".
\b.", "*
\b*", "[
\b[" and
638 "~
\b~" are treated as ordinary characters unless preceded by a
639 "\
\b\"; when preceded by a "\
\b\" they regain their special mean-
642 Replacement strings are the second part of a s
\bsu
\bub
\bbs
\bst
\bti
\bit
\btu
\but
\bte
\be
645 The character "&
\b&" (or "\
\b\&
\b&" if the m
\bma
\bag
\bgi
\bic
\bc option is _
\bn_
\bo_
\bt
646 set) in the replacement string stands for the text matched
647 by the RE that is being replaced. The character "~
\b~" (or
648 "\
\b\~
\b~" if the m
\bma
\bag
\bgi
\bic
\bc option is _
\bn_
\bo_
\bt set) stands for the replace-
649 ment part of the previous s
\bsu
\bub
\bbs
\bst
\bti
\bit
\btu
\but
\bte
\be command. It is only
650 valid after a s
\bsu
\bub
\bbs
\bst
\bti
\bit
\btu
\but
\bte
\be command has been performed.
652 The string "\
\b\#
\b#", where "#
\b#" is an integer value from 1
653 to 9, stands for the text matched by the portion of the RE
654 enclosed in the "#
\b#"'th set of escaped parentheses, e.g.
665 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-1
\b11
\b1
668 "\
\b\(
\b(" and "\
\b\)
\b)". For example, "s
\bs/
\b/a
\bab
\bbc
\bc\
\b\(
\b(.
\b.*
\b*\
\b\)
\b)d
\bde
\bef
\bf/
\b/\
\b\1
\b1/
\b/" deletes
669 the strings "a
\bab
\bbc
\bc" and "d
\bde
\bef
\bf" from the matched pattern.
671 The strings "\
\b\l
\bl", "\
\b\u
\bu", "\
\b\L
\bL" and "\
\b\U
\bU" can be used to
672 modify the case of elements in the replacement string. The
673 string "\
\b\l
\bl" causes the next character to be converted to
674 lowercase; the string "\
\b\u
\bu" behaves similarly, but converts
675 to uppercase (e.g. s
\bs/
\b/a
\bab
\bbc
\bc/
\b/\
\b\U
\bU&
\b&/
\b/ replaces the string a
\bab
\bbc
\bc with
676 A
\bAB
\bBC
\bC). The strings "\
\b\L
\bL" causes characters up to the end of
677 the string or the next occurrence of the strings "\
\b\e
\be" or
678 "\
\b\E
\bE" to be converted to lowercase; the string "\
\b\U
\bU" behaves
679 similarly, but converts to uppercase.
681 If the entire replacement pattern is "%
\b%", then the last
682 replacement pattern is used again.
684 In v
\bvi
\bi, inserting a <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-M
\bM>
\b> into the replacement
685 string will cause the matched line to be split into two
686 lines at that point. (The <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-M
\bM>
\b> will be discarded.)
688 8
\b8.
\b. G
\bGe
\ben
\bne
\ber
\bra
\bal
\bl E
\bEd
\bdi
\bit
\bto
\bor
\br D
\bDe
\bes
\bsc
\bcr
\bri
\bip
\bpt
\bti
\bio
\bon
\bn
690 When e
\bex
\bx or v
\bvi
\bi are executed, the text of a file is read
691 (or a temporary file is created), and then all editing
692 changes happen within the context of the copy of the file.
693 _
\bN_
\bo _
\bc_
\bh_
\ba_
\bn_
\bg_
\be_
\bs _
\ba_
\bf_
\bf_
\be_
\bc_
\bt _
\bt_
\bh_
\be _
\ba_
\bc_
\bt_
\bu_
\ba_
\bl _
\bf_
\bi_
\bl_
\be _
\bu_
\bn_
\bt_
\bi_
\bl _
\bt_
\bh_
\be _
\bf_
\bi_
\bl_
\be _
\bi_
\bs _
\bw_
\br_
\bi_
\bt_
\bt_
\be_
\bn
694 _
\bo_
\bu_
\bt, either using a write command or another command which
695 is affected by the a
\bau
\but
\bto
\bow
\bwr
\bri
\bit
\bte
\be option.
697 All files are locked (using the _
\bf_
\bl_
\bo_
\bc_
\bk(2) or _
\bf_
\bc_
\bn_
\bt_
\bl(2)
698 interfaces) during the edit session, to avoid inadvertently
699 making modifications to multiple copies of the file. If a
700 lock cannot be obtained for a file because it is locked by
701 another process, the edit session is read-only (as if the
702 r
\bre
\bea
\bad
\bdo
\bon
\bnl
\bly
\by option or the -
\b-R
\bR flag had been specified). If a
703 lock cannot be obtained for other reasons, the edit session
704 will continue, but the file status information (see the
705 <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-G
\bG>
\b> command) will reflect this fact.
707 Both e
\bex
\bx and v
\bvi
\bi are modeful editors, i.e. they have two
708 modes, "command" mode and "text input" mode. The former is
709 intended to permit you to enter commands which modifies
710 already existing text. The latter is intended to permit you
711 to enter new text. When e
\bex
\bx first starts running, it is in
712 command mode, and usually displays a prompt (see the p
\bpr
\bro
\bom
\bmp
\bpt
\bt
713 option for more information). The prompt is a single colon
714 (":
\b:") character. There are three commands that switch e
\bex
\bx
715 into text input mode: a
\bap
\bpp
\bpe
\ben
\bnd
\bd, c
\bch
\bha
\ban
\bng
\bge
\be and i
\bin
\bns
\bse
\ber
\brt
\bt. Once in
716 input mode, entering a line containing only a single period
717 (".
\b.") terminates text input mode and returns to command
718 mode, where the prompt is redisplayed.
731 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-1
\b12
\b2 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be
734 When v
\bvi
\bi first starts running, it is in command mode as
735 well. There are eleven commands that switch v
\bvi
\bi into text
736 input mode: A
\bA, a
\ba, C
\bC, c
\bc, I
\bI, i
\bi, O
\bO, o
\bo, R
\bR, S
\bS and s
\bs. Once in
737 input mode, entering an <
\b<e
\bes
\bsc
\bca
\bap
\bpe
\be>
\b> character terminates text
738 input mode and returns to command mode.
740 The following words have special meanings in both the
741 e
\bex
\bx and v
\bvi
\bi command descriptions:
743 <
\b<i
\bin
\bnt
\bte
\ber
\brr
\bru
\bup
\bpt
\bt>
\b>
744 The interrupt character is used to interrupt the cur-
745 rent operation. Normally <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-C
\bC>
\b>, whatever charac-
746 ter is set for the current terminal is used.
748 <
\b<l
\bli
\bit
\bte
\ber
\bra
\bal
\bl n
\bne
\bex
\bxt
\bt>
\b>
749 The literal next character is used to escape the subse-
750 quent character from any special meaning. This charac-
751 ter is always <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-V
\bV>
\b>. If the terminal is not set
752 up to do XON/XOFF flow control, then <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-Q
\bQ>
\b> is
753 used to mean literal next as well.
755 c
\bcu
\bur
\brr
\bre
\ben
\bnt
\bt p
\bpa
\bat
\bth
\bhn
\bna
\bam
\bme
\be
756 The pathname of the file currently being edited by vi.
757 When the percent character ("%
\b%") appears in a file name
758 entered as part of an e
\bex
\bx command argument, it is
759 replaced by the current pathname. (The "%
\b%" character
760 can be escaped by preceding it with a backslash.)
762 a
\bal
\blt
\bte
\ber
\brn
\bna
\bat
\bte
\be p
\bpa
\bat
\bth
\bhn
\bna
\bam
\bme
\be
763 The name of the last file name mentioned in an e
\bex
\bx com-
764 mand, or, the previous current pathname if the last
765 file mentioned becomes the current file. When the hash
766 mark character ("#
\b#") appears in a file name entered as
767 part of an e
\bex
\bx command argument, it is replaced by the
768 alternate pathname. (The "#
\b#" character can be escaped
769 by preceding it with a backslash.)
771 b
\bbu
\buf
\bff
\bfe
\ber
\br
772 One of a number of named areas for saving copies of
773 text. Commands that change or delete text can save the
774 changed or deleted text into a specific buffer, for
775 later use, if the command allows it (i.e. the e
\bex
\bx c
\bch
\bha
\ban
\bng
\bge
\be
776 command cannot save the changed text in a named
777 buffer). Buffers are named with a single character,
778 preceded by a double quote, e.g. "
\b"<
\b<c
\bch
\bha
\bar
\bra
\bac
\bct
\bte
\ber
\br>
\b>. His-
779 toric implementations of e
\bex
\bx/v
\bvi
\bi limited <
\b<c
\bch
\bha
\bar
\bra
\bac
\bct
\bte
\ber
\br>
\b> to
780 the alphanumeric characters; n
\bne
\bex
\bx/n
\bnv
\bvi
\bi permits the use of
783 Buffers named by uppercase characters are the same as
784 buffers named by lowercase characters, e.g. the buffer
785 named by the English character "A
\bA" is the same as the
786 buffer named by the character "a
\ba", with the exception
797 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-1
\b13
\b3
800 that, if the buffer contents are being changed (as with
801 a text deletion or v
\bvi
\bi c
\bch
\bha
\ban
\bng
\bge
\be command), the text is
802 _
\ba_
\bp_
\bp_
\be_
\bn_
\bd_
\be_
\bd to the buffer, instead of replacing the cur-
805 The buffers named by the numeric characters (in
806 English, "1
\b1" through "9
\b9"), are special, in that if at
807 least one line is changed or deleted in the file, (or a
808 command changes or deletes a region that crosses a line
809 boundary) a copy of the text is placed into the numeric
810 buffer "1
\b1", regardless of the user specifying another
811 buffer in which to save it. Before this copy is done,
812 the previous contents of buffer "1
\b1" are moved into
813 buffer "2
\b2", "2
\b2" into buffer "3
\b3", and so on. The con-
814 tents of buffer "9
\b9" are discarded. In v
\bvi
\bi, text may be
815 explicitly stored into the numeric buffers. In this
816 case, the buffer rotation described above occurs before
817 the replacement of the buffer's contents. (Text cannot
818 be explicitly stored into the numeric buffers in e
\bex
\bx
819 because of ambiguities that this would cause in the e
\bex
\bx
822 When a v
\bvi
\bi command synopsis shows both a [
\b[b
\bbu
\buf
\bff
\bfe
\ber
\br]
\b] and a
823 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b], they may be presented in any order.
825 Finally, all buffers are either "line" or "character"
826 oriented. All e
\bex
\bx commands which store text into
827 buffers are line oriented. Some v
\bvi
\bi commands which
828 store text into buffers are line oriented, and some are
829 character oriented; the description for each applicable
830 v
\bvi
\bi command notes whether text copied into buffers using
831 the command is line or character oriented. In addi-
832 tion, the v
\bvi
\bi command d
\bdi
\bis
\bsp
\bpl
\bla
\bay
\by b
\bbu
\buf
\bff
\bfe
\ber
\brs
\bs displays the cur-
833 rent orientation for each buffer. Generally, the only
834 importance attached to this orientation is that if the
835 buffer is subsequently inserted into the text, line
836 oriented buffers create new lines for each of the lines
837 they contain, and character oriented buffers create new
838 lines for any lines _
\bo_
\bt_
\bh_
\be_
\br than the first and last lines
839 they contain. The first and last lines are inserted
840 into the text at the current cursor position, becoming
841 part of the current line. If there is more than one
842 line in the buffer, however, the current line itself
845 u
\bun
\bnn
\bna
\bam
\bme
\bed
\bd b
\bbu
\buf
\bff
\bfe
\ber
\br
846 The unnamed buffer is a text storage area which is used
847 by commands that take a buffer as an argument, when no
848 buffer is specified by the user. There is no way to
849 explicitly reference this buffer.
863 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-1
\b14
\b4 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(V
\bVi
\bi C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b)
866 9
\b9.
\b. V
\bVi
\bi D
\bDe
\bes
\bsc
\bcr
\bri
\bip
\bpt
\bti
\bio
\bon
\bn
868 V
\bVi
\bi takes up the entire screen to display the edited
869 file, except for the bottom line of the screen. The bottom
870 line of the screen is used to enter e
\bex
\bx commands, and for v
\bvi
\bi
871 error and informational messages. If no other information
872 is being displayed, the default display can show the current
873 cursor row and cursor column, an indication of whether the
874 file has been modified, and the current mode of the editor.
875 See the r
\bru
\bul
\ble
\ber
\br, s
\bsh
\bho
\bow
\bwd
\bdi
\bir
\brt
\bty
\by and s
\bsh
\bho
\bow
\bwm
\bmo
\bod
\bde
\be options for more
878 Empty lines do not have any special representation on
879 the screen, but lines on the screen that would logically
880 come after the end of the file are displayed as a single
881 tilde ("~
\b~") character. To differentiate between empty lines
882 and lines consisting of only whitespace characters, use the
883 l
\bli
\bis
\bst
\bt option. Historically, implementations of v
\bvi
\bi have also
884 displayed some lines as single asterisk ("@
\b@") characters.
885 These were lines that were not correctly displayed, i.e.
886 lines on the screen that did not correspond to lines in the
887 file, or lines that did not fit on the current screen. N
\bNv
\bvi
\bi
888 never displays lines in this fashion.
890 V
\bVi
\bi is a modeful editor, i.e. it has two modes, "com-
891 mand" mode and "text input" mode. When v
\bvi
\bi first starts, it
892 is in command mode. There are several commands that change
893 v
\bvi
\bi into text input mode. The <
\b<e
\bes
\bsc
\bca
\bap
\bpe
\be>
\b> character is used to
894 resolve the text input into the file, and exit back into
895 command mode. In v
\bvi
\bi command mode, the cursor is always
896 positioned on the last column of characters which take up
897 more than one column on the screen. In v
\bvi
\bi text insert mode,
898 the cursor is positioned on the first column of characters
899 which take up more than one column on the screen.
901 Generally, if the cursor line and cursor column are not
902 on the screen, then the screen is scrolled (if the target
903 cursor is close) or repainted (if the target cursor is far
904 away) so that the cursor is on the screen. If the screen is
905 scrolled, it is moved a minimal amount, and the cursor line
906 will usually appear at the top or bottom of the screen. In
907 the screen is repainted, the cursor line will appear in the
908 center of the screen, unless the cursor is sufficiently
909 close to the beginning or end of the file that this is not
910 possible. If the l
\ble
\bef
\bft
\btr
\bri
\big
\bgh
\bht
\bt option is set, the screen may be
911 scrolled or repainted in a horizontal direction as well as
914 A major difference between the historical v
\bvi
\bi presenta-
915 tion and n
\bnv
\bvi
\bi is in the scrolling and screen oriented posi-
916 tion commands, <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-B
\bB>
\b>, <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-D
\bD>
\b>, <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-E
\bE>
\b>, <
\b<c
\bco
\bon
\bn-
\b-
917 t
\btr
\bro
\bol
\bl-
\b-F
\bF>
\b>, <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-U
\bU>
\b>, <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-Y
\bY>
\b>, H
\bH, L
\bL and M
\bM. In histori-
918 cal implementations of v
\bvi
\bi, these commands acted on physical
929 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(V
\bVi
\bi C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b) U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-1
\b15
\b5
932 (as opposed to logical, or screen) lines. For lines that
933 were sufficiently long in relation to the size of the
934 screen, this meant that single line scroll commands might
935 repaint the entire screen, scrolling or screen positioning
936 command might not change the screen or move the cursor at
937 all, and some lines simply could not be displayed, even
938 though v
\bvi
\bi would edit the file that contained them. In n
\bnv
\bvi
\bi,
939 these commands act on logical, i.e. screen lines. You are
940 unlikely to notice any difference unless you are editing
941 files with lines significantly longer than a screen width.
943 V
\bVi
\bi keeps track of the currently "most attractive" cur-
944 sor position. Each command description (for commands that
945 can change the current cursor position), specifies if the
946 cursor is set to a specific location in the line, or if it
947 is moved to the "most attractive cursor position". The lat-
948 ter means that the cursor is moved to the cursor position
949 that is vertically as close as possible to the current cur-
950 sor position. If the current line is shorter than the cur-
951 sor position v
\bvi
\bi would select, the cursor is positioned on
952 the last character in the line. (If the line is empty, the
953 cursor is positioned on the first column of the line.) If a
954 command moves the cursor to the most attractive position, it
955 does not alter the current cursor position, and a subsequent
956 movement will again attempt to move the cursor to that posi-
957 tion. Therefore, although a movement to a line shorter than
958 the currently most attractive position will cause the cursor
959 to move to the end of that line, a subsequent movement to a
960 longer line will cause the cursor to move back to the most
963 In addition, the $
\b$ command makes the end of each line
964 the most attractive cursor position rather than a specific
967 Each v
\bvi
\bi command described below notes where the cursor
968 ends up after it is executed. This position is described in
969 terms of characters on the line, i.e. "the previous charac-
970 ter", or, "the last character in the line". This is to
971 avoid needing to continually refer to on what part of the
972 character the cursor rests.
974 The following words have special meaning for v
\bvi
\bi com-
977 p
\bpr
\bre
\bev
\bvi
\bio
\bou
\bus
\bs c
\bco
\bon
\bnt
\bte
\bex
\bxt
\bt
978 The position of the cursor before the command which
979 caused the last absolute movement was executed. Each
980 v
\bvi
\bi command described in the next section that is con-
981 sidered an absolute movement is so noted. In addition,
982 specifying _
\ba_
\bn_
\by address to an e
\bex
\bx command is considered
983 an absolute movement.
995 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-1
\b16
\b6 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(V
\bVi
\bi C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b)
998 m
\bmo
\bot
\bti
\bio
\bon
\bn
999 A second v
\bvi
\bi command can be used as an optional trailing
1000 argument to the v
\bvi
\bi !
\b!, <
\b<, >
\b>, c
\bc, d
\bd, y
\by, and (depending on
1001 the t
\bti
\bil
\bld
\bde
\beo
\bop
\bp option) ~
\b~ commands. This command indicates
1002 the end of the region of text that's affected by the
1003 command. The motion command may be either the command
1004 character repeated (in which case it means the current
1005 line) or a cursor movement command. In the latter
1006 case, the region affected by the command is from the
1007 starting or stopping cursor position which comes first
1008 in the file, to immediately before the starting or
1009 stopping cursor position which comes later in the file.
1010 Commands that operate on lines instead of using begin-
1011 ning and ending cursor positions operate on all of the
1012 lines that are wholly or partially in the region. In
1013 addition, some other commands become line oriented
1014 depending on where in the text they are used. The com-
1015 mand descriptions below note these special cases.
1017 The following commands may all be used as motion compo-
1018 nents for v
\bvi
\bi commands:
1021 <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-A
\bA>
\b> <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-H
\bH>
\b> <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-J
\bJ>
\b> <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-M
\bM>
\b>
1022 <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-N
\bN>
\b> <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-P
\bP>
\b> <
\b<s
\bsp
\bpa
\bac
\bce
\be>
\b> $
\b$
1023 %
\b% '
\b'<
\b<c
\bch
\bha
\bar
\bra
\bac
\bct
\bte
\ber
\br>
\b> (
\b( )
\b)
1028 W
\bW [
\b[[
\b[ ]
\b]]
\b] ^
\b^
1029 _
\b_ `
\b`<
\b<c
\bch
\bha
\bar
\bra
\bac
\bct
\bte
\ber
\br>
\b> b
\bb e
\be
1035 The optional count prefix available for some of the v
\bvi
\bi
1036 commands that take motion commands, or the count prefix
1037 available for the v
\bvi
\bi commands that are used as motion
1038 components, may be included and is _
\ba_
\bl_
\bw_
\ba_
\by_
\bs considered
1039 part of the motion argument. For example, the commands
1040 "c
\bc2
\b2w
\bw" and "2
\b2c
\bcw
\bw" are equivalent, and the region affected
1041 by the c
\bc command is two words of text. In addition, if
1042 the optional count prefix is specified for both the v
\bvi
\bi
1043 command and its motion component, the effect is multi-
1044 plicative and is considered part of the motion argu-
1045 ment. For example, the commands "4
\b4c
\bcw
\bw" and "2
\b2c
\bc2
\b2w
\bw" are
1046 equivalent, and the region affected by the c
\bc command is
1061 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(V
\bVi
\bi C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b) U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-1
\b17
\b7
1064 c
\bco
\bou
\bun
\bnt
\bt
1065 A positive number used as an optional argument to most
1066 commands, either to give a size or a position (for dis-
1067 play or movement commands), or as a repeat count (for
1068 commands that modify text). The count argument is
1069 always optional and defaults to 1 unless otherwise
1070 noted in the command description.
1072 When a v
\bvi
\bi command synopsis shows both a [
\b[b
\bbu
\buf
\bff
\bfe
\ber
\br]
\b] and
1073 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b], they may be presented in any order.
1075 b
\bbi
\big
\bgw
\bwo
\bor
\brd
\bd
1076 A set of non-whitespace characters preceded and fol-
1077 lowed by whitespace characters or the beginning or end
1078 of the file or line.
1080 Groups of empty lines (or lines containing only whites-
1081 pace characters) are treated as a single bigword.
1084 Generally, in languages where it is applicable, v
\bvi
\bi rec-
1085 ognizes two kinds of words. First, a sequence of let-
1086 ters, digits and underscores, delimited at both ends
1087 by: characters other than letters, digits, or under-
1088 scores; the beginning or end of a line; the beginning
1089 or end of the file. Second, a sequence of characters
1090 other than letters, digits, underscores, or whitespace
1091 characters, delimited at both ends by: a letter, digit,
1092 underscore, or whitespace character; the beginning or
1093 end of a line; the beginning or end of the file.
1095 Groups of empty lines (or lines containing only whites-
1096 pace characters) are treated as a single word.
1098 p
\bpa
\bar
\bra
\bag
\bgr
\bra
\bap
\bph
\bh
1099 An area of text that begins with either the beginning
1100 of a file, an empty line, or a section boundary, and
1101 continues until either an empty line, section boundary,
1102 or the end of the file.
1104 Groups of empty lines (or lines containing only whites-
1105 pace characters) are treated as a single paragraph.
1107 Additional paragraph boundaries can be defined using
1108 the p
\bpa
\bar
\bra
\bag
\bgr
\bra
\bap
\bph
\bh option.
1110 s
\bse
\bec
\bct
\bti
\bio
\bon
\bn
1111 An area of text that starts with the beginning of the
1112 file or a line whose first character is an open brace
1113 ("{
\b{") and continues until the next section or the end
1116 Additional section boundaries can be defined using the
1127 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-1
\b18
\b8 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(V
\bVi
\bi C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b)
1130 s
\bse
\bec
\bct
\bti
\bio
\bon
\bns
\bs option.
1132 s
\bse
\ben
\bnt
\bte
\ben
\bnc
\bce
\be
1133 An area of text that begins with either the beginning
1134 of the file or the first nonblank character following
1135 the previous sentence, paragraph, or section boundary
1136 and continues until the end of the file or a or a
1137 period (".
\b.") exclamation point ("!
\b!") or question mark
1138 ("?
\b?") character, followed by either an end-of-line or
1139 two whitespace characters. Any number of closing
1140 parentheses (")
\b)"), brackets ("]
\b]") or double-quote (""
\b"")
1141 characters can appear between the period, exclamation
1142 point, or question mark and the whitespace characters
1145 Groups of empty lines (or lines containing only whites-
1146 pace characters) are treated as a single sentence.
1148 1
\b10
\b0.
\b. V
\bVi
\bi C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs
1150 The following section describes the commands available
1151 in the command mode of the v
\bvi
\bi editor. In each entry below,
1152 the tag line is a usage synopsis for the command character.
1153 In addition, the final line and column the cursor rests
1154 upon, and any options which affect the command are noted.
1156 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-A
\bA>
\b>
1157 Search forward c
\bco
\bou
\bun
\bnt
\bt times for the current word. The
1158 current word begins at the first non-whitespace charac-
1159 ter on or after the current cursor position, and
1160 extends up to the next non-word character or the end of
1161 the line. The search is literal, i.e. no characters in
1162 the word have any special meaning in terms of Regular
1163 Expressions. It is an error if no matching pattern is
1164 found between the starting position and the end of the
1167 The <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-A
\bA>
\b> command is an absolute movement. The
1168 <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-A
\bA>
\b> command may be used as the motion component
1169 of other v
\bvi
\bi commands, in which case any text copied
1170 into a buffer is character oriented.
1172 Line: Set to the line where the word is found.
1173 Column: Set to the first character of the word.
1174 Options: Affected by the e
\bex
\bxt
\bte
\ben
\bnd
\bde
\bed
\bd, i
\big
\bgn
\bno
\bor
\bre
\bec
\bca
\bas
\bse
\be and w
\bwr
\bra
\bap
\bp-
\b-
1175 s
\bsc
\bca
\ban
\bn options.
1177 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-B
\bB>
\b>
1178 Page backward c
\bco
\bou
\bun
\bnt
\bt screens. Two lines of overlap are
1179 maintained by displaying the window starting at line
1180 (
\b(t
\bto
\bop
\bp_
\b_l
\bli
\bin
\bne
\be -
\b- c
\bco
\bou
\bun
\bnt
\bt *
\b* w
\bwi
\bin
\bnd
\bdo
\bow
\bw_
\b_s
\bsi
\biz
\bze
\be)
\b) +
\b+ 2
\b2, where w
\bwi
\bin
\bnd
\bdo
\bow
\bw_
\b_s
\bsi
\biz
\bze
\be
1181 is the value of the w
\bwi
\bin
\bnd
\bdo
\bow
\bw option. (In the case of
1182 split screens, this size is corrected to the current
1193 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(V
\bVi
\bi C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b) U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-1
\b19
\b9
1196 screen size.) This is an error if the movement is past
1197 the beginning of the file.
1199 The <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-B
\bB>
\b> command is an absolute movement.
1201 Line: Set to the last line of text displayed on the
1203 Column: Set to the first nonblank character of the
1207 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-D
\bD>
\b>
1208 Scroll forward c
\bco
\bou
\bun
\bnt
\bt lines. If c
\bco
\bou
\bun
\bnt
\bt is not specified,
1209 scroll forward the number of lines specified by the
1210 last <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-D
\bD>
\b> or <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-U
\bU>
\b> command. If this is
1211 the first <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-D
\bD>
\b> or <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-U
\bU>
\b> command, scroll
1212 forward half the number of lines in the screen. (In
1213 the case of split screens, the default scrolling dis-
1214 tance is corrected to half the current screen size.)
1215 This is an error if the movement is past the end of the
1218 The <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-D
\bD>
\b> command is an absolute movement.
1220 Line: Set to the current line plus the number of
1222 Column: Set to the first nonblank character of the
1226 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-E
\bE>
\b>
1227 Scroll forward c
\bco
\bou
\bun
\bnt
\bt lines, leaving the cursor on the
1228 current line and column, if possible. This is an error
1229 if the movement is past the end of the file.
1231 Line: Unchanged unless the current line scrolls off
1232 the screen, in which case it is set to the
1233 first line on the screen.
1234 Column: Unchanged unless the current line scrolls off
1235 the screen, in which case it is set to the
1236 most attractive cursor position.
1239 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-F
\bF>
\b>
1240 Page forward c
\bco
\bou
\bun
\bnt
\bt screens. Two lines of overlap are
1241 maintained by displaying the window starting at line
1242 t
\bto
\bop
\bp_
\b_l
\bli
\bin
\bne
\be +
\b+ c
\bco
\bou
\bun
\bnt
\bt *
\b* w
\bwi
\bin
\bnd
\bdo
\bow
\bw_
\b_s
\bsi
\biz
\bze
\be -
\b- 2
\b2, where w
\bwi
\bin
\bnd
\bdo
\bow
\bw_
\b_s
\bsi
\biz
\bze
\be
1243 is the value of the w
\bwi
\bin
\bnd
\bdo
\bow
\bw option. (In the case of
1244 split screens, this size is corrected to the current
1245 screen size.) This is an error if the movement is past
1246 the end of the file.
1248 The <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-F
\bF>
\b> command is an absolute movement.
1259 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-2
\b20
\b0 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(V
\bVi
\bi C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b)
1262 Line: Set to the first line on the screen.
1263 Column: Set to the first nonblank character of the
1267 <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-G
\bG>
\b>
1268 Display the file information. The information includes
1269 the current pathname, the current line, the number of
1270 total lines in the file, the current line as a percent-
1271 age of the total lines in the file, if the file has
1272 been modified, was able to be locked, if the file's
1273 name has been changed, and if the edit session is read-
1280 <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-H
\bH>
\b>
1281 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] h
\bh
1282 Move the cursor back c
\bco
\bou
\bun
\bnt
\bt characters in the current
1283 line. This is an error if the cursor is on the first
1284 character in the line.
1286 The <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-H
\bH>
\b> and h
\bh commands may be used as the
1287 motion component of other v
\bvi
\bi commands, in which case
1288 any text copied into a buffer is character oriented.
1291 Column: Set to the c
\bcu
\bur
\brr
\bre
\ben
\bnt
\bt -
\b- c
\bco
\bou
\bun
\bnt
\bt character, or, the
1292 first character in the line if c
\bco
\bou
\bun
\bnt
\bt is
1293 greater than or equal to the number of charac-
1294 ters in the line before the cursor.
1297 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-J
\bJ>
\b>
1298 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-N
\bN>
\b>
1299 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] j
\bj
1300 Move the cursor down c
\bco
\bou
\bun
\bnt
\bt lines without changing the
1301 current column. This is an error if the movement is
1302 past the end of the file.
1304 The <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-J
\bJ>
\b>, <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-N
\bN>
\b> and j
\bj commands may be used
1305 as the motion component of other v
\bvi
\bi commands, in which
1306 case any text copied into a buffer is line oriented.
1308 Line: Set to the current line plus c
\bco
\bou
\bun
\bnt
\bt.
1309 Column: The most attractive cursor position.
1312 <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-L
\bL>
\b>
1313 <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-R
\bR>
\b>
1325 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(V
\bVi
\bi C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b) U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-2
\b21
\b1
1332 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-M
\bM>
\b>
1333 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] +
\b+
1334 Move the cursor down c
\bco
\bou
\bun
\bnt
\bt lines to the first nonblank
1335 character of that line. This is an error if the move-
1336 ment is past the end of the file.
1338 The <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-M
\bM>
\b> and +
\b+ commands may be used as the
1339 motion component of other v
\bvi
\bi commands, in which case
1340 any text copied into a buffer is line oriented.
1342 Line: Set to the current line plus c
\bco
\bou
\bun
\bnt
\bt.
1343 Column: Set to the first nonblank character in the
1347 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-P
\bP>
\b>
1348 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] k
\bk
1349 Move the cursor up c
\bco
\bou
\bun
\bnt
\bt lines, without changing the
1350 current column. This is an error if the movement is
1351 past the beginning of the file.
1353 The <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-P
\bP>
\b> and k
\bk commands may be used as the
1354 motion component of other v
\bvi
\bi commands, in which case
1355 any text copied into a buffer is line oriented.
1357 Line: Set to the current line minus count.
1358 Column: The most attractive cursor position.
1361 <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-T
\bT>
\b>
1362 Return to the most recent tag context. The <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-T
\bT>
\b>
1363 command is an absolute movement.
1365 Line: Set to the context of the previous tag com-
1367 Column: Set to the context of the previous tag com-
1371 <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-U
\bU>
\b>
1372 Scroll backward c
\bco
\bou
\bun
\bnt
\bt lines. If c
\bco
\bou
\bun
\bnt
\bt is not speci-
1373 fied, scroll backward the number of lines specified by
1374 the last <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-D
\bD>
\b> or <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-U
\bU>
\b> command. If this
1375 is the first <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-D
\bD>
\b> or <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-U
\bU>
\b> command, scroll
1376 backward half the number of lines in the screen. (In
1377 the case of split screens, the default scrolling dis-
1378 tance is corrected to half the current screen size.)
1379 This is an error if the movement is past the beginning
1391 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-2
\b22
\b2 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(V
\bVi
\bi C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b)
1394 The <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-U
\bU>
\b> command is an absolute movement.
1396 Line: Set to the current line minus the amount
1398 Column: Set to the first nonblank character in the
1402 <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-W
\bW>
\b>
1403 Switch to the next lower screen in the window, or, to
1404 the first screen if there are no lower screens in the
1407 Line: Set to the previous cursor position in the
1409 Column: Set to the previous cursor position in the
1413 <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-Y
\bY>
\b>
1414 Scroll backward c
\bco
\bou
\bun
\bnt
\bt lines, leaving the current line
1415 and column as is, if possible. This is an error if the
1416 movement is past the beginning of the file.
1418 Line: Unchanged unless the current line scrolls off
1419 the screen, in which case it is set to the
1420 last line of text displayed on the screen.
1421 Column: Unchanged unless the current line scrolls off
1422 the screen, in which case it is the most
1423 attractive cursor position.
1426 <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-Z
\bZ>
\b>
1427 Suspend the current editor session. If the file has
1428 been modified since it was last completely written, and
1429 the a
\bau
\but
\bto
\bow
\bwr
\bri
\bit
\bte
\be option is set, the file is written before
1430 the editor session is suspended. If this write fails,
1431 the editor session is not suspended.
1435 Options: Affected by the a
\bau
\but
\bto
\bow
\bwr
\bri
\bit
\bte
\be option.
1437 <
\b<e
\bes
\bsc
\bca
\bap
\bpe
\be>
\b>
1438 Execute e
\bex
\bx commands or cancel partial commands. If an
1439 e
\bex
\bx command is being entered (e.g. /
\b/, ?
\b?, :
\b: or !
\b!), the
1440 command is executed. If a partial command has been
1441 entered, e.g. or the command is cancelled. Otherwise,
1444 Line: When an e
\bex
\bx command is being executed, the cur-
1445 rent line is set as described for that com-
1446 mand. Otherwise, unchanged.
1457 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(V
\bVi
\bi C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b) U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-2
\b23
\b3
1460 Column: When an e
\bex
\bx command is being executed, the cur-
1461 rent column is set as described for that com-
1462 mand. Otherwise, unchanged.
1465 <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-]
\b]>
\b>
1466 Push a tag reference onto the tag stack. The tags
1467 files (see the t
\bta
\bag
\bgs
\bs option for more information) are
1468 searched for a tag matching the current word. The cur-
1469 rent word begins at the first non-whitespace character
1470 on or after the current cursor position, and extends up
1471 to the next non-word character or the end of the line.
1472 If a matching tag is found, the current file is dis-
1473 carded and the file containing the tag reference is
1476 If the current file has been modified since it was last
1477 completely written, the command will fail. The <
\b<c
\bco
\bon
\bn-
\b-
1478 t
\btr
\bro
\bol
\bl-
\b-]
\b]>
\b> command is an absolute movement.
1480 Line: Set to the line containing the matching tag
1482 Column: Set to the start of the matching tag string.
1483 Options: Affected by the t
\bta
\bag
\bgs
\bs and t
\bta
\bag
\bgl
\ble
\ben
\bng
\bgt
\bth
\bh options.
1485 <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-^
\b^>
\b>
1486 Switch to the most recently edited file.
1488 If the file has been modified since it was last com-
1489 pletely written, and the a
\bau
\but
\bto
\bow
\bwr
\bri
\bit
\bte
\be option is set, the
1490 file is written out. If this write fails, the command
1491 will fail. Otherwise, if the current file has been
1492 modified since it was last completely written, the com-
1495 Line: Set to the line the cursor was on when the
1496 file was last edited.
1497 Column: Set to the column the cursor was on when the
1498 file was last edited.
1499 Options: Affected by the a
\bau
\but
\bto
\bow
\bwr
\bri
\bit
\bte
\be option.
1501 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] <
\b<s
\bsp
\bpa
\bac
\bce
\be>
\b>
1502 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] l
\bl
1503 Move the cursor forward c
\bco
\bou
\bun
\bnt
\bt characters without chang-
1504 ing the current line. This is an error if the cursor
1505 is on the last character in the line.
1507 The <
\b<s
\bsp
\bpa
\bac
\bce
\be>
\b> and l
\bl commands may be used as the motion
1508 component of other v
\bvi
\bi commands, in which case any text
1509 copied into a buffer is character oriented. In addi-
1510 tion, these commands may be used as the motion compo-
1511 nents of other commands when the cursor is on the last
1512 character in the line, without error.
1523 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-2
\b24
\b4 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(V
\bVi
\bi C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b)
1527 Column: Set to the current character plus the next
1528 c
\bco
\bou
\bun
\bnt
\bt characters, or to the last character on
1529 the line if c
\bco
\bou
\bun
\bnt
\bt is greater than the number
1530 of characters in the line after the current
1534 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] !
\b! m
\bmo
\bot
\bti
\bio
\bon
\bn s
\bsh
\bhe
\bel
\bll
\bl-
\b-a
\bar
\brg
\bgu
\bum
\bme
\ben
\bnt
\bt(
\b(s
\bs)
\b)
1535 Replace text with results from a shell command. Pass
1536 the lines specified by the c
\bco
\bou
\bun
\bnt
\bt and m
\bmo
\bot
\bti
\bio
\bon
\bn arguments
1537 as standard input to the program named by the s
\bsh
\bhe
\bel
\bll
\bl
1538 option, and replace those lines with the output (both
1539 standard error and standard output) of that command.
1541 After the motion is entered, v
\bvi
\bi prompts for arguments
1542 to the shell command.
1544 Within those arguments, "%
\b%" and "#
\b#" characters are
1545 expanded to the current and alternate pathnames,
1546 respectively. The "!
\b!" character is expanded with the
1547 command text of the previous !
\b! or :
\b:!
\b! commands.
1548 (Therefore, the command !
\b!!
\b! repeats the previous !
\b!
1549 command.) The special meanings of "%
\b%", "#
\b#" and "!
\b!"
1550 can be overridden by escaping them with a backslash.
1551 If no !
\b! or :
\b:!
\b! command has yet been executed, it is an
1552 error to use an unescaped "!
\b!" character. The !
\b! com-
1553 mand does _
\bn_
\bo_
\bt do shell expansion on the strings pro-
1554 vided as arguments. If any of the above expansions
1555 change the arguments the user entered, the command is
1556 redisplayed at the bottom of the screen.
1558 V
\bVi
\bi then executes the program named by the s
\bsh
\bhe
\bel
\bll
\bl option,
1559 with a -
\b-c
\bc flag followed by the arguments (which are
1560 bundled into a single argument).
1562 The !
\b! command is permitted in an empty file.
1564 If the file has been modified since it was last com-
1565 pletely written, the !
\b! command will warn you.
1567 Line: The first line of the replaced text.
1568 Column: The first column of the replaced text.
1569 Options: Affected by the s
\bsh
\bhe
\bel
\bll
\bl option.
1571 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] #
\b# +
\b+|
\b|-
\b-|
\b|#
\b#
1572 Increment or decrement the current number. The current
1573 number begins at the first non-number character on or
1574 before the current cursor position, or the beginning of
1575 the line, and extends up to the first non-number char-
1576 acter on or after the current cursor position or the
1577 end of the line. If the trailing character is a +
\b+, the
1578 number is incremented by c
\bco
\bou
\bun
\bnt
\bt. If the trailing
1589 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(V
\bVi
\bi C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b) U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-2
\b25
\b5
1592 character is a -
\b-, the number is decremented by c
\bco
\bou
\bun
\bnt
\bt.
1593 If the trailing character is a #
\b#, the previous incre-
1594 ment or decrement is repeated.
1596 The format of the number (decimal, hexadecimal, and
1597 octal, and leading 0's) is retained unless the new
1598 value cannot be represented in the previous format.
1601 Column: Set to the first character in the cursor word.
1604 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] $
\b$
1605 Move the cursor to the end of a line. If c
\bco
\bou
\bun
\bnt
\bt is
1606 specified, the cursor moves down c
\bco
\bou
\bun
\bnt
\bt -
\b- 1
\b1 lines.
1608 It is not an error to use the $
\b$ command when the cursor
1609 is on the last character in the line or when the line
1612 The $
\b$ command may be used as the motion component of
1613 other v
\bvi
\bi commands, in which case any text copied into a
1614 buffer is character oriented, unless the cursor is at,
1615 or before the first nonblank character in the line, in
1616 which case it is line oriented. It is not an error to
1617 use the $
\b$ command as a motion component when the cursor
1618 is on the last character in the line, although it is an
1619 error when the line is empty.
1621 Line: Set to the current line plus c
\bco
\bou
\bun
\bnt
\bt minus 1.
1622 Column: Set to the last character in the line.
1626 Move to the matching character. The cursor moves to
1627 the parenthesis or curly brace which _
\bm_
\ba_
\bt_
\bc_
\bh_
\be_
\bs the paren-
1628 thesis or curly brace found at the current cursor posi-
1629 tion or which is the closest one to the right of the
1630 cursor on the line. It is an error to execute the %
\b%
1631 command on a line without a parenthesis or curly brace.
1632 Historically, any c
\bco
\bou
\bun
\bnt
\bt specified to the %
\b% command was
1635 The %
\b% command is an absolute movement. The %
\b% command
1636 may be used as the motion component of other v
\bvi
\bi com-
1637 mands, in which case any text copied into a buffer is
1638 character oriented, unless the starting point of the
1639 region is at or before the first nonblank character on
1640 its line, and the ending point is at or after the last
1641 nonblank character on its line, in which case it is
1655 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-2
\b26
\b6 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(V
\bVi
\bi C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b)
1658 Line: Set to the line containing the matching char-
1660 Column: Set to the matching character.
1664 Repeat the previous substitution command on the current
1667 Historically, any c
\bco
\bou
\bun
\bnt
\bt specified to the &
\b& command was
1671 Column: Unchanged if the cursor was on the last char-
1672 acter in the line, otherwise, set to the first
1673 nonblank character in the line.
1674 Options: Affected by the e
\bed
\bdc
\bco
\bom
\bmp
\bpa
\bat
\bti
\bib
\bbl
\ble
\be, e
\bex
\bxt
\bte
\ben
\bnd
\bde
\bed
\bd,
1675 i
\big
\bgn
\bno
\bor
\bre
\bec
\bca
\bas
\bse
\be and m
\bma
\bag
\bgi
\bic
\bc options.
1677 '
\b'<
\b<c
\bch
\bha
\bar
\bra
\bac
\bct
\bte
\ber
\br>
\b>
1678 `
\b`<
\b<c
\bch
\bha
\bar
\bra
\bac
\bct
\bte
\ber
\br>
\b>
1679 Return to a context marked by the character <
\b<c
\bch
\bha
\bar
\bra
\bac
\bc-
\b-
1680 t
\bte
\ber
\br>
\b>. If <
\b<c
\bch
\bha
\bar
\bra
\bac
\bct
\bte
\ber
\br>
\b> is the "'
\b'" or "`
\b`" character,
1681 return to the previous context. If <
\b<c
\bch
\bha
\bar
\bra
\bac
\bct
\bte
\ber
\br>
\b> is any
1682 other character, return to the context marked by that
1683 character (see the m
\bm command for more information). If
1684 the command is the '
\b' command, only the line value is
1685 restored, and the cursor is placed on the first non-
1686 blank character of that line. If the command is the `
\b`
1687 command, both the line and column values are restored.
1689 It is an error if the context no longer exists because
1690 of line deletion. (Contexts follow lines that are
1691 moved, or which are deleted and then restored.)
1693 The '
\b' and `
\b` commands are both absolute movements. They
1694 may be used as a motion component for other v
\bvi
\bi com-
1695 mands. For the '
\b' command, any text copied into a
1696 buffer is line oriented. For the `
\b` command, any text
1697 copied into a buffer is character oriented, unless it
1698 both starts and stops at the first character in the
1699 line, in which case it is line oriented. In addition,
1700 when using the `
\b` command as a motion component, com-
1701 mands which move backward and started at the first
1702 character in the line, or move forward and ended at the
1703 first character in the line, are corrected to the last
1704 character of the starting and ending lines, respec-
1707 Line: Set to the line from the context.
1708 Column: Set to the first nonblank character in the
1709 line, for the '
\b' command, and set to the con-
1710 text's column for the `
\b` command.
1721 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(V
\bVi
\bi C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b) U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-2
\b27
\b7
1726 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] (
\b(
1727 Back up c
\bco
\bou
\bun
\bnt
\bt sentences.
1729 The (
\b( command is an absolute movement. The (
\b( command
1730 may be used as the motion component of other v
\bvi
\bi com-
1731 mands, in which case any text copied into a buffer is
1732 character oriented, unless the starting and stopping
1733 points of the region are the first character in the
1734 line, in which case it is line oriented. In the latter
1735 case, the stopping point of the region is adjusted to
1736 be the end of the line immediately before it, and not
1737 the original cursor position.
1739 Line: Set to the line containing the beginning of
1741 Column: Set to the first nonblank character of the
1745 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] )
\b)
1746 Move forward c
\bco
\bou
\bun
\bnt
\bt sentences.
1748 The )
\b) command is an absolute movement. The )
\b) command
1749 may be used as the motion component of other v
\bvi
\bi com-
1750 mands, in which case any text copied into a buffer is
1751 character oriented, unless the starting point of the
1752 region is the first character in the line, in which
1753 case it is line oriented. In the latter case, if the
1754 stopping point of the region is also the first charac-
1755 ter in the line, it is adjusted to be the end of the
1756 line immediately before it.
1758 Line: Set to the line containing the beginning of
1760 Column: Set to the first nonblank character of the
1764 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] ,
\b,
1765 Reverse find character c
\bco
\bou
\bun
\bnt
\bt times. Reverse the last
1766 F
\bF, f
\bf, T
\bT or t
\bt command, searching the other way in the
1767 line, c
\bco
\bou
\bun
\bnt
\bt times.
1769 The ,
\b, command may be used as the motion component of
1770 other v
\bvi
\bi commands, in which case any text copied into a
1771 buffer is character oriented.
1774 Column: Set to the searched-for character.
1787 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-2
\b28
\b8 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(V
\bVi
\bi C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b)
1790 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] -
\b-
1791 Move to first nonblank of the previous line, c
\bco
\bou
\bun
\bnt
\bt
1794 This is an error if the movement is past the beginning
1797 The -
\b- command may be used as the motion component of
1798 other v
\bvi
\bi commands, in which case any text copied into a
1799 buffer is line oriented.
1801 Line: Set to the current line minus c
\bco
\bou
\bun
\bnt
\bt.
1802 Column: Set to the first nonblank character in the
1806 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] .
\b.
1807 Repeat the last v
\bvi
\bi command that modified text. The
1808 repeated command may be a command and motion component
1809 combination. If c
\bco
\bou
\bun
\bnt
\bt is specified, it replaces _
\bb_
\bo_
\bt_
\bh
1810 the count specified for the repeated command, and, if
1811 applicable, for the repeated motion component. If
1812 c
\bco
\bou
\bun
\bnt
\bt is not specified, the counts originally specified
1813 to the command being repeated are used again.
1815 As a special case, if the .
\b. command is executed imme-
1816 diately after the u
\bu command, the change log is rolled
1817 forward or backward, depending on the action of the u
\bu
1820 Line: Set as described for the repeated command.
1821 Column: Set as described for the repeated command.
1824 /
\b/R
\bRE
\bE<
\b<c
\bca
\bar
\brr
\bri
\bia
\bag
\bge
\be-
\b-r
\bre
\bet
\btu
\bur
\brn
\bn>
\b>
1825 /
\b/R
\bRE
\bE/
\b/ [
\b[o
\bof
\bff
\bfs
\bse
\bet
\bt]
\b]<
\b<c
\bca
\bar
\brr
\bri
\bia
\bag
\bge
\be-
\b-r
\bre
\bet
\btu
\bur
\brn
\bn>
\b>
1826 ?
\b?R
\bRE
\bE<
\b<c
\bca
\bar
\brr
\bri
\bia
\bag
\bge
\be-
\b-r
\bre
\bet
\btu
\bur
\brn
\bn>
\b>
1827 ?
\b?R
\bRE
\bE?
\b? [
\b[o
\bof
\bff
\bfs
\bse
\bet
\bt]
\b]<
\b<c
\bca
\bar
\brr
\bri
\bia
\bag
\bge
\be-
\b-r
\bre
\bet
\btu
\bur
\brn
\bn>
\b>
1830 Search forward or backward for a regular expression.
1831 The commands beginning with a slash ("/
\b/") character are
1832 forward searches, the commands beginning with a ques-
1833 tion mark ("?
\b?") are backward searches. V
\bVi
\bi prompts
1834 with the leading character on the last line of the
1835 screen for a string. It then searches forward or back-
1836 ward in the file for the next occurrence of the string,
1837 which is interpreted as a Basic Regular Expression.
1839 The /
\b/ and ?
\b? commands are absolute movements. They may
1840 be used as the motion components of other v
\bvi
\bi commands,
1841 in which case any text copied into a buffer is charac-
1842 ter oriented, unless the search started and ended on
1853 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(V
\bVi
\bi C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b) U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-2
\b29
\b9
1856 the first column of a line, in which case it is line
1857 oriented. In addition, forward searches ending at the
1858 first character of a line, and backward searches begin-
1859 ning at the first character in the line, are corrected
1860 to begin or end at the last character of the previous
1861 line. (Note, forward and backward searches can occur
1862 for both /
\b/ and ?
\b? commands, if the w
\bwr
\bra
\bap
\bps
\bsc
\bca
\ban
\bn option is
1865 If an offset from the matched line is specified (i.e. a
1866 trailing "/
\b/" or "?
\b?" character is followed by a signed
1867 offset), the buffer will always be line oriented (e.g.
1868 "/
\b/s
\bst
\btr
\bri
\bin
\bng
\bg/
\b/+
\b+0
\b0" will always guarantee a line orientation).
1870 The n
\bn command repeats the previous search.
1872 The N
\bN command repeats the previous search, but in the
1875 Missing RE's (e.g. "/
\b//
\b/<
\b<c
\bca
\bar
\brr
\bri
\bia
\bag
\bge
\be-
\b-r
\bre
\bet
\btu
\bur
\brn
\bn>
\b>", "/
\b/<
\b<c
\bca
\bar
\brr
\bri
\bia
\bag
\bge
\be-
\b-
1876 r
\bre
\bet
\btu
\bur
\brn
\bn>
\b>", "?
\b??
\b?<
\b<c
\bca
\bar
\brr
\bri
\bia
\bag
\bge
\be-
\b-r
\bre
\bet
\btu
\bur
\brn
\bn>
\b>", or "?
\b?<
\b<c
\bca
\bar
\brr
\bri
\bia
\bag
\bge
\be-
\b-
1877 r
\bre
\bet
\btu
\bur
\brn
\bn>
\b>" search for the last search RE, in the indi-
1880 Searches may be interrupted using the <
\b<i
\bin
\bnt
\bte
\ber
\brr
\bru
\bup
\bpt
\bt>
\b> char-
1883 Line: Set to the line in which the match occurred.
1884 Column: Set to the first character of the matched
1886 Options: Affected by the e
\bed
\bdc
\bco
\bom
\bmp
\bpa
\bat
\bti
\bib
\bbl
\ble
\be, e
\bex
\bxt
\bte
\ben
\bnd
\bde
\bed
\bd,
1887 i
\big
\bgn
\bno
\bor
\bre
\bec
\bca
\bas
\bse
\be, m
\bma
\bag
\bgi
\bic
\bc, and w
\bwr
\bra
\bap
\bps
\bsc
\bca
\ban
\bn options.
1890 Move to the first character in the current line. It is
1891 not an error to use the 0
\b0 command when the cursor is on
1892 the first character in the line,
1894 The 0
\b0 command may be used as the motion component of
1895 other v
\bvi
\bi commands, in which case it is an error if the
1896 cursor is on the first character in the line.
1899 Column: Set to the first character in the line.
1903 Execute an ex command. V
\bVi
\bi prompts for an e
\bex
\bx command on
1904 the last line of the screen, using a colon (":
\b:") char-
1905 acter. The command is terminated by a <
\b<c
\bca
\bar
\brr
\bri
\bia
\bag
\bge
\be-
\b-
1906 r
\bre
\bet
\btu
\bur
\brn
\bn>
\b>, <
\b<n
\bne
\bew
\bwl
\bli
\bin
\bne
\be>
\b> or <
\b<e
\bes
\bsc
\bca
\bap
\bpe
\be>
\b> character; all of these
1907 characters may be escaped by using a <
\b<l
\bli
\bit
\bte
\ber
\bra
\bal
\bl n
\bne
\bex
\bxt
\bt>
\b>
1908 character. The command is then executed.
1919 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-3
\b30
\b0 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(V
\bVi
\bi C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b)
1922 If the e
\bex
\bx command writes to the screen, v
\bvi
\bi will prompt
1923 the user for a <
\b<c
\bca
\bar
\brr
\bri
\bia
\bag
\bge
\be-
\b-r
\bre
\bet
\btu
\bur
\brn
\bn>
\b> before continuing when
1924 the e
\bex
\bx command finishes. Large amounts of output from
1925 the e
\bex
\bx command will be paged for the user, and the user
1926 prompted for a <
\b<c
\bca
\bar
\brr
\bri
\bia
\bag
\bge
\be-
\b-r
\bre
\bet
\btu
\bur
\brn
\bn>
\b> or <
\b<s
\bsp
\bpa
\bac
\bce
\be>
\b> key to con-
1927 tinue. In some cases, a quit (normally a "q" charac-
1928 ter) or <
\b<i
\bin
\bnt
\bte
\ber
\brr
\bru
\bup
\bpt
\bt>
\b> may be entered to interrupt the e
\bex
\bx
1931 When the e
\bex
\bx command finishes, and the user is prompted
1932 to resume visual mode, it is also possible to enter
1933 another ":
\b:" character followed by another e
\bex
\bx command.
1935 Line: The current line is set as described for the
1937 Column: The current column is set as described for the
1941 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] ;
\b;
1942 Repeat the last character find c
\bco
\bou
\bun
\bnt
\bt times. The last
1943 character find is one of the F
\bF, f
\bf, T
\bT or t
\bt commands.
1945 The ;
\b; command may be used as the motion component of
1946 other v
\bvi
\bi commands, in which case any text copied into a
1947 buffer is character oriented.
1950 Column: Set to the searched-for character.
1953 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] <
\b< m
\bmo
\bot
\bti
\bio
\bon
\bn
1954 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] >
\b> m
\bmo
\bot
\bti
\bio
\bon
\bn
1955 Shift lines left or right. Shift the number of lines
1956 in the region specified by the motion component, times
1957 c
\bco
\bou
\bun
\bnt
\bt, left (for the <
\b< command) or right (for the >
\b>
1958 command) by the number of columns specified by the
1959 s
\bsh
\bhi
\bif
\bft
\btw
\bwi
\bid
\bdt
\bth
\bh option. Only whitespace characters are
1960 deleted when shifting left; once the first character in
1961 the line contains a nonblank character, the s
\bsh
\bhi
\bif
\bft
\bt will
1962 succeed, but the line will not be modified.
1965 Column: Set to the first nonblank character in the
1967 Options: Affected by the s
\bsh
\bhi
\bif
\bft
\btw
\bwi
\bid
\bdt
\bth
\bh option.
1969 @
\b@ b
\bbu
\buf
\bff
\bfe
\ber
\br
1970 Execute a named buffer. Execute the named buffer as v
\bvi
\bi
1971 commands. The buffer may include e
\bex
\bx commands, too, but
1972 they must be expressed as a :
\b: command. If the buffer
1973 is line oriented, <
\b<n
\bne
\bew
\bwl
\bli
\bin
\bne
\be>
\b> characters are logically
1974 appended to each line of the buffer. If the buffer is
1985 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(V
\bVi
\bi C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b) U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-3
\b31
\b1
1988 character oriented, <
\b<n
\bne
\bew
\bwl
\bli
\bin
\bne
\be>
\b> characters are logically
1989 appended to all but the last line in the buffer.
1991 If the buffer name is "@
\b@", or "*
\b*", then the last buffer
1992 executed shall be used. It is an error to specify "@
\b@@
\b@"
1993 or "*
\b**
\b*" if there were no buffer previous executions.
1994 The text of a macro may contain an @
\b@ command, and it is
1995 possible to create infinite loops in this manner. (The
1996 <
\b<i
\bin
\bnt
\bte
\ber
\brr
\bru
\bup
\bpt
\bt>
\b> character may be used to interrupt the
1999 Line: The current line is set as described for the
2001 Column: The current column is set as described for the
2005 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] A
\bA
2006 Enter input mode, appending the text after the end of
2007 the line. If c
\bco
\bou
\bun
\bnt
\bt is specified, the text is repeat-
2008 edly input c
\bco
\bou
\bun
\bnt
\bt -
\b- 1
\b1 more times after input mode is
2011 Line: Set to the last line upon which characters
2013 Column: Set to the last character entered.
2014 Options: Affected by the a
\bal
\blt
\btw
\bwe
\ber
\bra
\bas
\bse
\be, a
\bau
\but
\bto
\boi
\bin
\bnd
\bde
\ben
\bnt
\bt, b
\bbe
\bea
\bau
\bu-
\b-
2015 t
\bti
\bif
\bfy
\by, s
\bsh
\bho
\bow
\bwm
\bma
\bat
\btc
\bch
\bh, t
\btt
\bty
\byw
\bwe
\ber
\bra
\bas
\bse
\be and w
\bwr
\bra
\bap
\bpm
\bma
\bar
\brg
\bgi
\bin
\bn
2018 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] B
\bB
2019 Move backward c
\bco
\bou
\bun
\bnt
\bt bigwords. Move the cursor backward
2020 to the beginning of a bigword by repeating the follow-
2021 ing algorithm: if the current position is at the begin-
2022 ning of a bigword or the character at the current posi-
2023 tion cannot be part of a bigword, move to the first
2024 character of the preceding bigword. Otherwise, move to
2025 the first character of the bigword at the current posi-
2026 tion. If no preceding bigword exists on the current
2027 line, move to the first character of the last bigword
2028 on the first preceding line that contains a bigword.
2030 The B
\bB command may be used as the motion component of
2031 other v
\bvi
\bi commands, in which case any text copied into a
2032 buffer is character oriented.
2034 Line: Set to the line containing the word selected.
2035 Column: Set to the first character of the word
2039 [
\b[b
\bbu
\buf
\bff
\bfe
\ber
\br]
\b] [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] C
\bC
2040 Change text from the current position to the end-of-
2051 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-3
\b32
\b2 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(V
\bVi
\bi C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b)
2054 line. If c
\bco
\bou
\bun
\bnt
\bt is specified, the input text replaces
2055 from the current position to the end-of-line, plus
2056 c
\bco
\bou
\bun
\bnt
\bt -
\b- 1
\b1 subsequent lines.
2058 Line: Set to the last line upon which characters
2060 Column: Set to the last character entered.
2061 Options: Affected by the a
\bal
\blt
\btw
\bwe
\ber
\bra
\bas
\bse
\be, a
\bau
\but
\bto
\boi
\bin
\bnd
\bde
\ben
\bnt
\bt, b
\bbe
\bea
\bau
\bu-
\b-
2062 t
\bti
\bif
\bfy
\by, s
\bsh
\bho
\bow
\bwm
\bma
\bat
\btc
\bch
\bh, t
\btt
\bty
\byw
\bwe
\ber
\bra
\bas
\bse
\be and w
\bwr
\bra
\bap
\bpm
\bma
\bar
\brg
\bgi
\bin
\bn
2065 [
\b[b
\bbu
\buf
\bff
\bfe
\ber
\br]
\b] D
\bD
2066 Delete text from the current position to the end-of-
2069 It is not an error to execute the D
\bD command on an empty
2073 Column: Set to the character before the current char-
2074 acter, or, column 1 if the cursor was on col-
2078 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] E
\bE
2079 Move forward c
\bco
\bou
\bun
\bnt
\bt end-of-bigwords. Move the cursor
2080 forward to the end of a bigword by repeating the fol-
2081 lowing algorithm: if the current position is the end of
2082 a bigword or the character at that position cannot be
2083 part of a bigword, move to the last character of the
2084 following bigword. Otherwise, move to the last charac-
2085 ter of the bigword at the current position. If no suc-
2086 ceeding bigword exists on the current line, move to the
2087 last character of the first bigword on the next follow-
2088 ing line that contains a bigword.
2090 The E
\bE command may be used as the motion component of
2091 other v
\bvi
\bi commands, in which case any text copied into a
2092 buffer is character oriented.
2094 Line: Set to the line containing the word selected.
2095 Column: Set to the last character of the word
2099 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] F
\bF <
\b<c
\bch
\bha
\bar
\bra
\bac
\bct
\bte
\ber
\br>
\b>
2100 Search c
\bco
\bou
\bun
\bnt
\bt times backward through the current line
2101 for <
\b<c
\bch
\bha
\bar
\bra
\bac
\bct
\bte
\ber
\br>
\b>.
2103 The F
\bF command may be used as the motion component of
2104 other v
\bvi
\bi commands, in which case any text copied into a
2105 buffer is character oriented.
2117 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(V
\bVi
\bi C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b) U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-3
\b33
\b3
2121 Column: Set to the searched-for character.
2124 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] G
\bG
2125 Move to line c
\bco
\bou
\bun
\bnt
\bt, or the last line of the file if
2126 c
\bco
\bou
\bun
\bnt
\bt not specified.
2128 The G
\bG command is an absolute movement. The G
\bG command
2129 may be used as the motion component of other v
\bvi
\bi com-
2130 mands, in which case any text copied into a buffer is
2133 Line: Set to c
\bco
\bou
\bun
\bnt
\bt, if specified, otherwise, the
2135 Column: Set to the first nonblank character in the
2139 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] H
\bH
2140 Move to the screen line c
\bco
\bou
\bun
\bnt
\bt -
\b- 1
\b1 lines below the top
2143 The H
\bH command is an absolute movement. The H
\bH command
2144 may be used as the motion component of other v
\bvi
\bi com-
2145 mands, in which case any text copied into a buffer is
2148 Line: Set to the line c
\bco
\bou
\bun
\bnt
\bt -
\b- 1
\b1 lines below the top
2150 Column: Set to the first nonblank character of the
2151 _
\bs_
\bc_
\br_
\be_
\be_
\bn line.
2154 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] I
\bI
2155 Enter input mode, inserting the text at the beginning
2156 of the line. If c
\bco
\bou
\bun
\bnt
\bt is specified, the text input is
2157 repeatedly input c
\bco
\bou
\bun
\bnt
\bt -
\b- 1
\b1 more times.
2159 Line: Set to the last line upon which characters
2161 Column: Set to the last character entered.
2164 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] J
\bJ
2165 Join lines. If c
\bco
\bou
\bun
\bnt
\bt is specified, c
\bco
\bou
\bun
\bnt
\bt lines are
2166 joined; a minimum of two lines are always joined,
2167 regardless of the value of c
\bco
\bou
\bun
\bnt
\bt.
2169 If the current line ends with a whitespace character,
2170 all whitespace is stripped from the next line. Other-
2171 wise, if the next line starts with a open parenthesis
2172 ("(
\b(") do nothing. Otherwise, if the current line ends
2183 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-3
\b34
\b4 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(V
\bVi
\bi C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b)
2186 with a question mark ("?
\b?"), period (".
\b.") or exclama-
2187 tion point ("!
\b!"), insert two spaces. Otherwise, insert
2190 It is not an error to join lines past the end of the
2191 file, i.e. lines that do not exist.
2194 Column: Set to the character after the last character
2195 of the next-to-last joined line.
2198 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] L
\bL
2199 Move to the screen line c
\bco
\bou
\bun
\bnt
\bt -
\b- 1
\b1 lines above the bot-
2202 The L
\bL command is an absolute movement. The L
\bL command
2203 may be used as the motion component of other v
\bvi
\bi com-
2204 mands, in which case any text copied into a buffer is
2207 Line: Set to the line c
\bco
\bou
\bun
\bnt
\bt -
\b- 1
\b1 lines above the bot-
2209 Column: Set to the first nonblank character of the
2210 _
\bs_
\bc_
\br_
\be_
\be_
\bn line.
2214 Move to the screen line in the middle of the screen.
2216 The M
\bM command is an absolute movement. The M
\bM command
2217 may be used as the motion component of other v
\bvi
\bi com-
2218 mands, in which case any text copied into a buffer is
2221 Historically, any c
\bco
\bou
\bun
\bnt
\bt specified to the M
\bM command was
2224 Line: Set to the line in the middle of the screen.
2225 Column: Set to the first nonblank character of the
2226 _
\bs_
\bc_
\br_
\be_
\be_
\bn line.
2229 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] O
\bO
2230 Enter input mode, appending text in a new line above
2231 the current line. If c
\bco
\bou
\bun
\bnt
\bt is specified, the text
2232 input is repeatedly input c
\bco
\bou
\bun
\bnt
\bt -
\b- 1
\b1 more times.
2234 Historically, any c
\bco
\bou
\bun
\bnt
\bt specified to the O
\bO command was
2237 Line: Set to the last line upon which characters
2249 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(V
\bVi
\bi C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b) U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-3
\b35
\b5
2252 Column: Set to the last character entered.
2253 Options: Affected by the a
\bal
\blt
\btw
\bwe
\ber
\bra
\bas
\bse
\be, a
\bau
\but
\bto
\boi
\bin
\bnd
\bde
\ben
\bnt
\bt, b
\bbe
\bea
\bau
\bu-
\b-
2254 t
\bti
\bif
\bfy
\by, s
\bsh
\bho
\bow
\bwm
\bma
\bat
\btc
\bch
\bh, t
\btt
\bty
\byw
\bwe
\ber
\bra
\bas
\bse
\be and w
\bwr
\bra
\bap
\bpm
\bma
\bar
\brg
\bgi
\bin
\bn
2257 [
\b[b
\bbu
\buf
\bff
\bfe
\ber
\br]
\b] P
\bP
2258 Insert text from a buffer. Text from the buffer (the
2259 unnamed buffer by default) is inserted before the cur-
2260 rent column or, if the buffer is line oriented, before
2263 Line: Set to the lowest numbered line insert, if the
2264 buffer is line oriented, otherwise unchanged.
2265 Column: Set to the first nonblank character of the
2266 appended text, if the buffer is line oriented,
2267 otherwise, the last character of the appended
2272 Exit v
\bvi
\bi (or visual) mode and switch to e
\bex
\bx mode.
2275 Column: No longer relevant.
2278 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] R
\bR
2279 Enter input mode, replacing the characters in the cur-
2280 rent line. If c
\bco
\bou
\bun
\bnt
\bt is specified, the text input is
2281 repeatedly input c
\bco
\bou
\bun
\bnt
\bt -
\b- 1
\b1 more times.
2283 If the end of the current line is reached, no more
2284 characters are replaced and any further characters
2285 input are appended to the line.
2287 Line: Set to the last line upon which characters
2289 Column: Set to the last character entered.
2290 Options: Affected by the a
\bal
\blt
\btw
\bwe
\ber
\bra
\bas
\bse
\be, a
\bau
\but
\bto
\boi
\bin
\bnd
\bde
\ben
\bnt
\bt, b
\bbe
\bea
\bau
\bu-
\b-
2291 t
\bti
\bif
\bfy
\by, s
\bsh
\bho
\bow
\bwm
\bma
\bat
\btc
\bch
\bh, t
\btt
\bty
\byw
\bwe
\ber
\bra
\bas
\bse
\be and w
\bwr
\bra
\bap
\bpm
\bma
\bar
\brg
\bgi
\bin
\bn
2294 [
\b[b
\bbu
\buf
\bff
\bfe
\ber
\br]
\b] [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] S
\bS
2295 Substitute c
\bco
\bou
\bun
\bnt
\bt lines.
2297 Line: Set to the last line upon which characters
2299 Column: Set to the last character entered.
2300 Options: Affected by the a
\bal
\blt
\btw
\bwe
\ber
\bra
\bas
\bse
\be, a
\bau
\but
\bto
\boi
\bin
\bnd
\bde
\ben
\bnt
\bt, b
\bbe
\bea
\bau
\bu-
\b-
2301 t
\bti
\bif
\bfy
\by, s
\bsh
\bho
\bow
\bwm
\bma
\bat
\btc
\bch
\bh, t
\btt
\bty
\byw
\bwe
\ber
\bra
\bas
\bse
\be and w
\bwr
\bra
\bap
\bpm
\bma
\bar
\brg
\bgi
\bin
\bn
2315 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-3
\b36
\b6 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(V
\bVi
\bi C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b)
2318 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] T
\bT <
\b<c
\bch
\bha
\bar
\bra
\bac
\bct
\bte
\ber
\br>
\b>
2319 Search backward, c
\bco
\bou
\bun
\bnt
\bt times, through the current line
2320 for the character _
\ba_
\bf_
\bt_
\be_
\br the specified <
\b<c
\bch
\bha
\bar
\bra
\bac
\bct
\bte
\ber
\br>
\b>.
2322 The T
\bT command may be used as the motion component of
2323 other v
\bvi
\bi commands, in which case any text copied into a
2324 buffer is character oriented.
2327 Column: Set to the character _
\ba_
\bf_
\bt_
\be_
\br the searched-for
2332 Restore the current line to its state before the cursor
2336 Column: The first character in the line.
2339 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] W
\bW
2340 Move forward c
\bco
\bou
\bun
\bnt
\bt bigwords. Move the cursor forward
2341 to the beginning of a bigword by repeating the follow-
2342 ing algorithm: if the current position is within a big-
2343 word or the character at that position cannot be part
2344 of a bigword, move to the first character of the next
2345 bigword. If no subsequent bigword exists on the cur-
2346 rent line, move to the first character of the first
2347 bigword on the first following line that contains a
2350 The W
\bW command may be used as the motion component of
2351 other v
\bvi
\bi commands, in which case any text copied into a
2352 buffer is character oriented.
2354 Line: The line containing the word selected.
2355 Column: The first character of the word selected.
2358 [
\b[b
\bbu
\buf
\bff
\bfe
\ber
\br]
\b] [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] X
\bX
2359 Delete c
\bco
\bou
\bun
\bnt
\bt characters before the cursor. If the num-
2360 ber of characters to be deleted is greater than or
2361 equal to the number of characters to the beginning of
2362 the line, all of the characters before the current cur-
2363 sor position, to the beginning of the line, are
2367 Column: Set to the current character minus c
\bco
\bou
\bun
\bnt
\bt, or
2368 the first character if count is greater than
2369 the number of characters in the line before
2381 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(V
\bVi
\bi C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b) U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-3
\b37
\b7
2386 [
\b[b
\bbu
\buf
\bff
\bfe
\ber
\br]
\b] [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] Y
\bY
2387 Copy (or "yank") c
\bco
\bou
\bun
\bnt
\bt lines into the specified buffer.
2394 Write the file and exit v
\bvi
\bi. The file is only written
2395 if it has been modified since the last complete write
2396 of the file to any file.
2398 The Z
\bZZ
\bZ command will exit the editor after writing the
2399 file, if there are no further files to edit. Entering
2400 two "quit" commands (i.e. w
\bwq
\bq, q
\bqu
\bui
\bit
\bt, x
\bxi
\bit
\bt or Z
\bZZ
\bZ) in a
2401 row will override this check and the editor will exit,
2402 ignoring any files that have not yet been edited.
2408 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] [
\b[[
\b[
2409 Back up c
\bco
\bou
\bun
\bnt
\bt section boundaries.
2411 The [
\b[[
\b[ command is an absolute movement. The [
\b[[
\b[ command
2412 may be used as the motion component of other v
\bvi
\bi com-
2413 mands, in which case any text copied into a buffer is
2414 character oriented, unless the starting position is
2415 column 0, in which case it is line oriented.
2417 This is an error if the movement is past the beginning
2420 Line: Set to the previous line that is c
\bco
\bou
\bun
\bnt
\bt section
2421 boundaries back, or the first line of the file
2422 if no more section boundaries exist preceding
2424 Column: Set to the first nonblank character in the
2426 Options: Affected by the s
\bse
\bec
\bct
\bti
\bio
\bon
\bns
\bs option.
2428 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] ]
\b]]
\b]
2429 Move forward c
\bco
\bou
\bun
\bnt
\bt section boundaries.
2431 The ]
\b]]
\b] command is an absolute movement. The ]
\b]]
\b] command
2432 may be used as the motion component of other v
\bvi
\bi com-
2433 mands, in which case any text copied into a buffer is
2434 character oriented, unless the starting position is
2435 column 0, in which case it is line oriented.
2447 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-3
\b38
\b8 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(V
\bVi
\bi C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b)
2450 This is an error if the movement is past the end of the
2453 Line: Set to the line that is c
\bco
\bou
\bun
\bnt
\bt section bound-
2454 aries forward, or to the last line of the file
2455 if no more section boundaries exist following
2457 Column: Set to the first nonblank character in the
2459 Options: Affected by the s
\bse
\bec
\bct
\bti
\bio
\bon
\bns
\bs option.
2462 Move to first nonblank character on the current line.
2464 The ^
\b^ command may be used as the motion component of
2465 other v
\bvi
\bi commands, in which case any text copied into a
2466 buffer is character oriented.
2469 Column: Set to the first nonblank character of the
2473 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] _
\b_
2474 Move down c
\bco
\bou
\bun
\bnt
\bt -
\b- 1
\b1 lines, to the first nonblank char-
2475 acter. The _
\b_ command may be used as the motion compo-
2476 nent of other v
\bvi
\bi commands, in which case any text
2477 copied into a buffer is line oriented.
2479 It is not an error to execute the _
\b_ command when the
2480 cursor is on the first character in the line.
2482 Line: The current line plus c
\bco
\bou
\bun
\bnt
\bt -
\b- 1
\b1.
2483 Column: The first nonblank character in the line.
2486 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] a
\ba
2487 Enter input mode, appending the text after the cursor.
2488 If c
\bco
\bou
\bun
\bnt
\bt is specified, the text input is repeatedly
2489 input c
\bco
\bou
\bun
\bnt
\bt -
\b- 1
\b1 more times.
2491 Line: Set to the last line upon which characters
2493 Column: Set to the last character entered.
2494 Options: Affected by the a
\bal
\blt
\btw
\bwe
\ber
\bra
\bas
\bse
\be, a
\bau
\but
\bto
\boi
\bin
\bnd
\bde
\ben
\bnt
\bt, b
\bbe
\bea
\bau
\bu-
\b-
2495 t
\bti
\bif
\bfy
\by, s
\bsh
\bho
\bow
\bwm
\bma
\bat
\btc
\bch
\bh, t
\btt
\bty
\byw
\bwe
\ber
\bra
\bas
\bse
\be and w
\bwr
\bra
\bap
\bpm
\bma
\bar
\brg
\bgi
\bin
\bn
2498 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] b
\bb
2499 Move backward c
\bco
\bou
\bun
\bnt
\bt words. Move the cursor backward to
2500 the beginning of a word by repeating the following
2501 algorithm: if the current position is at the beginning
2502 of a word, move to the first character of the preceding
2513 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(V
\bVi
\bi C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b) U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-3
\b39
\b9
2516 word. Otherwise, the current position moves to the
2517 first character of the word at the current position.
2518 If no preceding word exists on the current line, move
2519 to the first character of the last word on the first
2520 preceding line that contains a word.
2522 The b
\bb command may be used as the motion component of
2523 other v
\bvi
\bi commands, in which case any text copied into a
2524 buffer is character oriented.
2526 Line: Set to the line containing the word selected.
2527 Column: Set to the first character of the word
2531 [
\b[b
\bbu
\buf
\bff
\bfe
\ber
\br]
\b] [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] c
\bc m
\bmo
\bot
\bti
\bio
\bon
\bn
2532 Change a region of text. If only part of a single line
2533 is affected, then the last character being changed is
2534 marked with a "$
\b$". Otherwise, the region of text is
2535 deleted, and input mode is entered.
2537 If c
\bco
\bou
\bun
\bnt
\bt is specified, it is applied to the m
\bmo
\bot
\bti
\bio
\bon
\bn.
2539 Line: Set to the last line upon which characters
2541 Column: Set to the last character entered.
2542 Options: Affected by the a
\bal
\blt
\btw
\bwe
\ber
\bra
\bas
\bse
\be, a
\bau
\but
\bto
\boi
\bin
\bnd
\bde
\ben
\bnt
\bt, b
\bbe
\bea
\bau
\bu-
\b-
2543 t
\bti
\bif
\bfy
\by, s
\bsh
\bho
\bow
\bwm
\bma
\bat
\btc
\bch
\bh, t
\btt
\bty
\byw
\bwe
\ber
\bra
\bas
\bse
\be and w
\bwr
\bra
\bap
\bpm
\bma
\bar
\brg
\bgi
\bin
\bn
2546 [
\b[b
\bbu
\buf
\bff
\bfe
\ber
\br]
\b] [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] d
\bd m
\bmo
\bot
\bti
\bio
\bon
\bn
2547 Delete a region of text. If c
\bco
\bou
\bun
\bnt
\bt is specified, it is
2548 applied to the m
\bmo
\bot
\bti
\bio
\bon
\bn.
2550 Line: Set to the line where the region starts.
2551 Column: Set to the first character in the line after
2552 the last character in the region. If no such
2553 character exists, set to the last character
2557 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] e
\be
2558 Move forward c
\bco
\bou
\bun
\bnt
\bt end-of-words. Move the cursor for-
2559 ward to the end of a word by repeating the following
2560 algorithm: if the current position is the end of a
2561 word, move to the last character of the following word.
2562 Otherwise, move to the last character of the word at
2563 the current position. If no succeeding word exists on
2564 the current line, move to the last character of the
2565 first word on the next following line that contains a
2568 The e
\be command may be used as the motion component of
2579 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-4
\b40
\b0 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(V
\bVi
\bi C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b)
2582 other v
\bvi
\bi commands, in which case any text copied into a
2583 buffer is character oriented.
2585 Line: Set to the line containing the word selected.
2586 Column: Set to the last character of the word
2590 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] f
\bf <
\b<c
\bch
\bha
\bar
\bra
\bac
\bct
\bte
\ber
\br>
\b>
2591 Search forward, c
\bco
\bou
\bun
\bnt
\bt times, through the rest of the
2592 current line for <
\b<c
\bch
\bha
\bar
\bra
\bac
\bct
\bte
\ber
\br>
\b>.
2594 The f
\bf command may be used as the motion component of
2595 other v
\bvi
\bi commands, in which case any text copied into a
2596 buffer is character oriented.
2599 Column: Set to the searched-for character.
2602 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] i
\bi
2603 Enter input mode, inserting the text before the cursor.
2604 If c
\bco
\bou
\bun
\bnt
\bt is specified, the text input is repeatedly
2605 input c
\bco
\bou
\bun
\bnt
\bt -
\b- 1
\b1 more times.
2607 Line: Set to the last line upon which characters
2609 Column: Set to the last character entered.
2610 Options: Affected by the a
\bal
\blt
\btw
\bwe
\ber
\bra
\bas
\bse
\be, a
\bau
\but
\bto
\boi
\bin
\bnd
\bde
\ben
\bnt
\bt, b
\bbe
\bea
\bau
\bu-
\b-
2611 t
\bti
\bif
\bfy
\by, s
\bsh
\bho
\bow
\bwm
\bma
\bat
\btc
\bch
\bh, t
\btt
\bty
\byw
\bwe
\ber
\bra
\bas
\bse
\be and w
\bwr
\bra
\bap
\bpm
\bma
\bar
\brg
\bgi
\bin
\bn
2614 m
\bm <
\b<c
\bch
\bha
\bar
\bra
\bac
\bct
\bte
\ber
\br>
\b>
2615 Save the current context (line and column) as <
\b<c
\bch
\bha
\bar
\bra
\bac
\bc-
\b-
2616 t
\bte
\ber
\br>
\b>. The exact position is referred to by "`
\b`<
\b<c
\bch
\bha
\bar
\bra
\bac
\bc-
\b-
2617 t
\bte
\ber
\br>
\b>". The line is referred to by "'
\b'<
\b<c
\bch
\bha
\bar
\bra
\bac
\bct
\bte
\ber
\br>
\b>".
2619 Historically, <
\b<c
\bch
\bha
\bar
\bra
\bac
\bct
\bte
\ber
\br>
\b> was restricted to lower-case
2620 letters only, n
\bnv
\bvi
\bi permits the use of any character.
2626 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] o
\bo
2627 Enter input mode, appending text in a new line under
2628 the current line. If c
\bco
\bou
\bun
\bnt
\bt is specified, the text
2629 input is repeatedly input c
\bco
\bou
\bun
\bnt
\bt -
\b- 1
\b1 more times.
2631 Historically, any c
\bco
\bou
\bun
\bnt
\bt specified to the o
\bo command was
2645 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(V
\bVi
\bi C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b) U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-4
\b41
\b1
2648 Line: Set to the last line upon which characters
2650 Column: Set to the last character entered.
2651 Options: Affected by the a
\bal
\blt
\btw
\bwe
\ber
\bra
\bas
\bse
\be, a
\bau
\but
\bto
\boi
\bin
\bnd
\bde
\ben
\bnt
\bt, b
\bbe
\bea
\bau
\bu-
\b-
2652 t
\bti
\bif
\bfy
\by, s
\bsh
\bho
\bow
\bwm
\bma
\bat
\btc
\bch
\bh, t
\btt
\bty
\byw
\bwe
\ber
\bra
\bas
\bse
\be and w
\bwr
\bra
\bap
\bpm
\bma
\bar
\brg
\bgi
\bin
\bn
2655 [
\b[b
\bbu
\buf
\bff
\bfe
\ber
\br]
\b] p
\bp
2656 Append text from a buffer. Text from the buffer (the
2657 unnamed buffer by default) is appended after the cur-
2658 rent column or, if the buffer is line oriented, after
2661 Line: Set to the first line appended, if the buffer
2662 is line oriented, otherwise unchanged.
2663 Column: Set to the first nonblank character of the
2664 appended text if the buffer is line oriented,
2665 otherwise, the last character of the appended
2669 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] r
\br <
\b<c
\bch
\bha
\bar
\bra
\bac
\bct
\bte
\ber
\br>
\b>
2670 Replace characters. The next c
\bco
\bou
\bun
\bnt
\bt characters in the
2671 line are replaced with <
\b<c
\bch
\bha
\bar
\bra
\bac
\bct
\bte
\ber
\br>
\b>. Replacing charac-
2672 ters with <
\b<n
\bne
\bew
\bwl
\bli
\bin
\bne
\be>
\b> characters results in creating new,
2673 empty lines into the file.
2675 If <
\b<c
\bch
\bha
\bar
\bra
\bac
\bct
\bte
\ber
\br>
\b> is <
\b<e
\bes
\bsc
\bca
\bap
\bpe
\be>
\b>, the command is cancelled.
2677 Line: Unchanged unless the replacement character is
2678 a <
\b<n
\bne
\bew
\bwl
\bli
\bin
\bne
\be>
\b>, in which case it is set to the
2679 current line plus c
\bco
\bou
\bun
\bnt
\bt -
\b- 1
\b1.
2680 Column: Set to the last character replaced, unless the
2681 replacement character is a <
\b<n
\bne
\bew
\bwl
\bli
\bin
\bne
\be>
\b>, in which
2682 case the cursor is in column 1 of the last
2686 [
\b[b
\bbu
\buf
\bff
\bfe
\ber
\br]
\b] [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] s
\bs
2687 Substitute c
\bco
\bou
\bun
\bnt
\bt characters in the current line start-
2688 ing with the current character.
2690 Line: Set to the last line upon which characters
2692 Column: Set to the last character entered.
2693 Options: Affected by the a
\bal
\blt
\btw
\bwe
\ber
\bra
\bas
\bse
\be, a
\bau
\but
\bto
\boi
\bin
\bnd
\bde
\ben
\bnt
\bt, b
\bbe
\bea
\bau
\bu-
\b-
2694 t
\bti
\bif
\bfy
\by, s
\bsh
\bho
\bow
\bwm
\bma
\bat
\btc
\bch
\bh, t
\btt
\bty
\byw
\bwe
\ber
\bra
\bas
\bse
\be and w
\bwr
\bra
\bap
\bpm
\bma
\bar
\brg
\bgi
\bin
\bn
2697 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] t
\bt <
\b<c
\bch
\bha
\bar
\bra
\bac
\bct
\bte
\ber
\br>
\b>
2698 Search forward, c
\bco
\bou
\bun
\bnt
\bt times, through the current line
2699 for the character immediately _
\bb_
\be_
\bf_
\bo_
\br_
\be <
\b<c
\bch
\bha
\bar
\bra
\bac
\bct
\bte
\ber
\br>
\b>.
2711 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-4
\b42
\b2 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(V
\bVi
\bi C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b)
2714 The t
\bt command may be used as the motion component of
2715 other v
\bvi
\bi commands, in which case any text copied into a
2716 buffer is character oriented.
2719 Column: Set to the character _
\bb_
\be_
\bf_
\bo_
\br_
\be the searched-for
2724 Undo the last change made to the file. If repeated,
2725 the u
\bu command alternates between these two states, and
2726 is its own inverse. When used after an insert that
2727 inserted text on more than one line, the lines are
2728 saved in the numeric buffers.
2730 The .
\b. command, when used immediately after the u
\bu com-
2731 mand, causes the change log to be rolled forward or
2732 backward, depending on the action of the u
\bu command.
2734 Line: Set to the position of the first line changed,
2735 if the reversal affects only one line or rep-
2736 resents an addition or change; otherwise, the
2737 line preceding the deleted text.
2738 Column: Set to the cursor position before the change
2742 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] w
\bw
2743 Move forward c
\bco
\bou
\bun
\bnt
\bt words. Move the cursor forward to
2744 the beginning of a word by repeating the following
2745 algorithm: if the current position is at the beginning
2746 of a word, move to the first character of the next
2747 word. If no subsequent word exists on the current
2748 line, move to the first character of the first word on
2749 the first following line that contains a word.
2751 The w
\bw command may be used as the motion component of
2752 other v
\bvi
\bi commands, in which case any text copied into a
2753 buffer is character oriented.
2755 Line: Set to the line containing the word selected.
2756 Column: Set to the first character of the word
2760 [
\b[b
\bbu
\buf
\bff
\bfe
\ber
\br]
\b] [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] x
\bx
2761 Delete c
\bco
\bou
\bun
\bnt
\bt characters. The deletion is at the cur-
2762 rent character position. If the number of characters
2763 to be deleted is greater than or equal to the number of
2764 characters to the end of the line, all of the charac-
2765 ters from the current cursor position to the end of the
2777 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(V
\bVi
\bi C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b) U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-4
\b43
\b3
2781 Column: Unchanged unless the last character in the
2782 line is deleted and the cursor is not already
2783 on the first character in the line, in which
2784 case it is set to the previous character.
2787 [
\b[b
\bbu
\buf
\bff
\bfe
\ber
\br]
\b] [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] y
\by m
\bmo
\bot
\bti
\bio
\bon
\bn
2788 Copy (or "yank") a text region specified by the c
\bco
\bou
\bun
\bnt
\bt
2789 and motion into a buffer. If c
\bco
\bou
\bun
\bnt
\bt is specified, it is
2790 applied to the m
\bmo
\bot
\bti
\bio
\bon
\bn.
2792 Line: Unchanged, unless the region covers more than
2793 a single line, in which case it is set to the
2794 line where the region starts.
2795 Column: Unchanged, unless the region covers more than
2796 a single line, in which case it is set to the
2797 character were the region starts.
2800 [
\b[c
\bco
\bou
\bun
\bnt
\bt1
\b1]
\b] z
\bz [
\b[c
\bco
\bou
\bun
\bnt
\bt2
\b2]
\b] t
\bty
\byp
\bpe
\be
2801 Redraw the screen with a window c
\bco
\bou
\bun
\bnt
\bt2
\b2 lines long, with
2802 line c
\bco
\bou
\bun
\bnt
\bt1
\b1 placed as specified by the t
\bty
\byp
\bpe
\be character.
2803 If c
\bco
\bou
\bun
\bnt
\bt1
\b1 is not specified, it defaults to the current
2804 line. If c
\bco
\bou
\bun
\bnt
\bt2
\b2 is not specified, it defaults to the
2805 current window size.
2807 The following t
\bty
\byp
\bpe
\be characters may be used:
2809 + If c
\bco
\bou
\bun
\bnt
\bt1
\b1 is specified, place the line c
\bco
\bou
\bun
\bnt
\bt1
\b1
2810 at the top of the screen. Otherwise, display
2811 the screen after the current screen, similarly
2812 to the <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-F
\bF>
\b> command.
2814 Place the line c
\bco
\bou
\bun
\bnt
\bt1
\b1 at the top of the
2816 . Place the line c
\bco
\bou
\bun
\bnt
\bt1
\b1 in the center of the
2818 - Place the line c
\bco
\bou
\bun
\bnt
\bt1
\b1 at the bottom of the
2820 ^ If c
\bco
\bou
\bun
\bnt
\bt1
\b1 is specified, place the line that is
2821 at the top of the screen when c
\bco
\bou
\bun
\bnt
\bt1
\b1 is at the
2822 bottom of the screen, at the bottom of the
2823 screen, i.e. display the screen before the
2824 screen before c
\bco
\bou
\bun
\bnt
\bt1
\b1. Otherwise, display the
2825 screen before the current screen, similarly to
2826 the <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-B
\bB>
\b> command.
2828 Line: Set to c
\bco
\bou
\bun
\bnt
\bt1
\b1 unless c
\bco
\bou
\bun
\bnt
\bt1
\b1 is not specified
2829 and the t
\bty
\byp
\bpe
\be character was either "^
\b^" or "+
\b+",
2830 in which case it is set to the line before the
2831 first line on the previous screen or the line
2832 after the last line on the previous screen,
2843 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-4
\b44
\b4 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(V
\bVi
\bi C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b)
2847 Column: Set to the first nonblank character in the
2851 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] {
\b{
2852 Move backward c
\bco
\bou
\bun
\bnt
\bt paragraphs.
2854 The {
\b{ command is an absolute movement. The {
\b{ command
2855 may be used as the motion component of other v
\bvi
\bi com-
2856 mands, in which case any text copied into a buffer is
2857 character oriented, unless the starting character is
2858 the first character on its line, in which case it is
2861 Line: Set to the line containing the beginning of
2862 the previous paragraph.
2863 Column: Set to the first nonblank character in the
2865 Options: Affected by the p
\bpa
\bar
\bra
\bag
\bgr
\bra
\bap
\bph
\bh option.
2867 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] |
\b|
2868 Move to a specific _
\bc_
\bo_
\bl_
\bu_
\bm_
\bn position on the current line.
2870 The |
\b| command may be used as the motion component of
2871 other v
\bvi
\bi commands, in which case any text copied into a
2872 buffer is character oriented. It is an error to use
2873 the |
\b| command as a motion component and for the cursor
2877 Column: Set to the character occupying the column
2878 position identified by c
\bco
\bou
\bun
\bnt
\bt, if the position
2879 exists in the line. If the column length of
2880 the current line is less than c
\bco
\bou
\bun
\bnt
\bt, the cur-
2881 sor is moved to the last character in the
2885 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] }
\b}
2886 Move forward c
\bco
\bou
\bun
\bnt
\bt paragraphs.
2888 The }
\b} command is an absolute movement. The }
\b} command
2889 may be used as the motion component of other v
\bvi
\bi com-
2890 mands, in which case any text copied into a buffer is
2891 character oriented, unless the starting character is at
2892 or before any nonblank characters in its line, in which
2893 case it is line oriented.
2895 Line: Set to the line containing the beginning of
2897 Column: Set to the first nonblank character in the
2909 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(V
\bVi
\bi C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b) U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-4
\b45
\b5
2912 Options: Affected by the p
\bpa
\bar
\bra
\bag
\bgr
\bra
\bap
\bph
\bh option.
2914 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] ~
\b~
2915 Reverse the case of the next c
\bco
\bou
\bun
\bnt
\bt character(s). This
2916 is the historic semantic for the ~
\b~ command and it is
2917 only in effect if the t
\bti
\bil
\bld
\bde
\beo
\bop
\bp option is not set.
2919 Lowercase alphabetic characters are changed to upper-
2920 case, and uppercase characters are changed to lower-
2921 case. No other characters are affected.
2923 Historically, the ~
\b~ command did not take an associated
2924 count, nor did it move past the end of the current
2925 line. As it had no associated motion it was difficult
2926 to change the case of large blocks of text. In n
\bnv
\bvi
\bi, if
2927 the cursor is on the last character of a line, and
2928 there are more lines in the file, the cursor moves to
2931 It is not an error to specify a count larger than the
2932 number of characters between the cursor and the end of
2935 Line: Set to the line of the character after c
\bco
\bou
\bun
\bnt
\bt
2936 characters, or, end of file.
2937 Column: Set to the character after c
\bco
\bou
\bun
\bnt
\bt characters,
2939 Options: Affected by the t
\bti
\bil
\bld
\bde
\beo
\bop
\bp option.
2941 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] ~
\b~ m
\bmo
\bot
\bti
\bio
\bon
\bn
2942 Reverse the case of the characters in a text region
2943 specified by the c
\bco
\bou
\bun
\bnt
\bt and m
\bmo
\bot
\bti
\bio
\bon
\bn. Only in effect if
2944 the t
\bti
\bil
\bld
\bde
\beo
\bop
\bp option is set.
2946 Lowercase characters are changed to uppercase, and
2947 uppercase characters are changed to lowercase. No
2948 other characters are affected.
2950 Line: Set to the line of the character after the
2951 last character in the region.
2952 Column: Set to the character after the last character
2954 Options: Affected by the t
\bti
\bil
\bld
\bde
\beo
\bop
\bp option.
2956 <
\b<i
\bin
\bnt
\bte
\ber
\brr
\bru
\bup
\bpt
\bt>
\b>
2957 Interrupt the current operation. Many of the poten-
2958 tially long-running v
\bvi
\bi commands may be interrupted
2959 using the terminal interrupt character. These opera-
2960 tions include searches, file reading and writing, fil-
2961 ter operations and map character expansion. Interrupts
2962 are also enabled when running commands outside of v
\bvi
\bi.
2964 If the <
\b<i
\bin
\bnt
\bte
\ber
\brr
\bru
\bup
\bpt
\bt>
\b> character is used to interrupt while
2975 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-4
\b46
\b6 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(V
\bVi
\bi C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b)
2978 entering an e
\bex
\bx command, the command is aborted, the
2979 cursor returns to its previous position, and v
\bvi
\bi remains
2982 Generally, if the <
\b<i
\bin
\bnt
\bte
\ber
\brr
\bru
\bup
\bpt
\bt>
\b> character is used to
2983 interrupt any operation, any changes made before the
2984 interrupt are left in place.
2986 Line: Dependent on the operation being interrupted.
2987 Column: Dependent on the operation being interrupted.
2990 1
\b11
\b1.
\b. V
\bVi
\bi T
\bTe
\bex
\bxt
\bt I
\bIn
\bnp
\bpu
\but
\bt C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs
2992 The following section describes the commands
2993 available in the text input mode of the v
\bvi
\bi editor.
2995 Historically, v
\bvi
\bi implementations only permitted
2996 the characters inserted on the current line to be
2997 erased. In addition, only the <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-D
\bD>
\b> erase char-
2998 acter and the "0
\b0<
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-D
\bD>
\b>" and "^
\b^<
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-D
\bD>
\b>" erase
2999 strings could erase autoindent characters. This imple-
3000 mentation permits erasure to continue past the begin-
3001 ning of the current line, and back to where text input
3002 mode was entered. In addition, autoindent characters
3003 may be erased using the standard erase characters. For
3004 the line and word erase characters, reaching the
3005 autoindent characters forms a "soft" boundary, denoting
3006 the end of the current word or line erase. Repeating
3007 the word or line erase key will erase the autoindent
3010 Historically, v
\bvi
\bi always used <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-H
\bH>
\b> and <
\b<c
\bco
\bon
\bn-
\b-
3011 t
\btr
\bro
\bol
\bl-
\b-W
\bW>
\b> as character and word erase characters, respec-
3012 tively, regardless of the current terminal settings.
3013 This implementation accepts, in addition to these two
3014 characters, the current terminal characters for those
3017 <
\b<n
\bnu
\bul
\bl>
\b>
3018 If the first character of the input is a <
\b<n
\bnu
\bul
\bl>
\b>,
3019 the previous input is replayed, as if just
3022 <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-D
\bD>
\b>
3023 If the previous character on the line was an
3024 autoindent character, erase it. Otherwise, if the
3025 user is entering the first character in the line,
3026 <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-D
\bD>
\b> is ignored. Otherwise, a literal
3027 <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-D
\bD>
\b> character is entered.
3029 ^
\b^<
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-D
\bD>
\b>
3030 If the previous character on the line was an
3041 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(V
\bVi
\bi C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b) U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-4
\b47
\b7
3044 autoindent character, erase all of the autoindent
3045 characters on the line. In addition, the autoin-
3046 dent level is reset to 0.
3048 0
\b0<
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-D
\bD>
\b>
3049 If the previous character on the line was an
3050 autoindent character, erase all of the autoindent
3051 characters on the line.
3053 <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-T
\bT>
\b>
3054 Insert sufficient <
\b<t
\bta
\bab
\bb>
\b> and <
\b<s
\bsp
\bpa
\bac
\bce
\be>
\b> characters to
3055 move the cursor forward to a column immediately
3056 after the next column which is an even multiple of
3057 the s
\bsh
\bhi
\bif
\bft
\btw
\bwi
\bid
\bdt
\bth
\bh option.
3059 Historically, v
\bvi
\bi did not permit the <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-T
\bT>
\b>
3060 command to be used unless the cursor was at the
3061 first column of a new line or it was preceded only
3062 by autoindent characters. N
\bNv
\bvi
\bi permits it to be
3063 used at any time during insert mode.
3065 <
\b<e
\ber
\bra
\bas
\bse
\be>
\b>
3066 <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-H
\bH>
\b>
3067 Erase the last character.
3069 <
\b<l
\bli
\bit
\bte
\ber
\bra
\bal
\bl n
\bne
\bex
\bxt
\bt>
\b>
3070 Quote the next character. The next character will
3071 not be mapped (see the m
\bma
\bap
\bp command for more infor-
3072 mation) or interpreted specially. A carat ("^
\b^")
3073 character will be displayed immediately as a
3074 placeholder, but will be replaced by the next
3077 <
\b<e
\bes
\bsc
\bca
\bap
\bpe
\be>
\b>
3078 Resolve all text input into the file, and return
3081 <
\b<l
\bli
\bin
\bne
\be e
\ber
\bra
\bas
\bse
\be>
\b>
3082 Erase the current line.
3084 <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-W
\bW>
\b>
3085 <
\b<w
\bwo
\bor
\brd
\bd e
\ber
\bra
\bas
\bse
\be>
\b>
3086 Erase the last word. The definition of word is
3087 dependent on the a
\bal
\blt
\btw
\bwe
\ber
\bra
\bas
\bse
\be and t
\btt
\bty
\byw
\bwe
\ber
\bra
\bas
\bse
\be options.
3089 <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-X
\bX>
\b>[
\b[0
\b0-
\b-9
\b9A
\bA-
\b-F
\bFa
\ba-
\b-f
\bf]
\b]*
\b*
3090 Insert a character with the specified hexadecimal
3091 value into the text.
3093 <
\b<i
\bin
\bnt
\bte
\ber
\brr
\bru
\bup
\bpt
\bt>
\b>
3094 Interrupt text input mode, returning to command
3095 mode. If the <
\b<i
\bin
\bnt
\bte
\ber
\brr
\bru
\bup
\bpt
\bt>
\b> character is used to
3096 interrupt inserting text into the file, it is as
3107 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-4
\b48
\b8 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(V
\bVi
\bi C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b)
3110 if the <
\b<e
\bes
\bsc
\bca
\bap
\bpe
\be>
\b> character was used; all text input
3111 up to the interruption is resolved into the file.
3113 1
\b12
\b2.
\b. E
\bEx
\bx A
\bAd
\bdd
\bdr
\bre
\bes
\bss
\bsi
\bin
\bng
\bg
3115 Addressing in e
\bex
\bx (and when e
\bex
\bx commands are exe-
3116 cuted from v
\bvi
\bi) relates to the current line. In gen-
3117 eral, the current line is the last line affected by a
3118 command. The exact effect on the current line is dis-
3119 cussed under the description of each command. When the
3120 file contains no lines, the current line is zero.
3122 Addresses are constructed by one or more of the
3125 (1) The address ".
\b." refers to the current line.
3127 (2) The address "$
\b$" refers to the last line of the
3130 (3) The address "N
\bN", where N
\bN is a positive number,
3131 refers to the N-th line of the file.
3133 (4) The address "'
\b'<
\b<c
\bch
\bha
\bar
\bra
\bac
\bct
\bte
\ber
\br>
\b>" or "`
\b`<
\b<c
\bch
\bha
\bar
\bra
\bac
\bct
\bte
\ber
\br>
\b>"
3134 refers to the line marked with the name <
\b<c
\bch
\bha
\bar
\bra
\bac
\bc-
\b-
3135 t
\bte
\ber
\br>
\b>. (See the k
\bk or m
\bm commands for more infor-
3136 mation on how to mark lines.)
3138 (5) A regular expression (RE) enclosed by slashes
3139 ("/
\b/") is an address, and it refers to the first
3140 line found by searching forward from the line
3141 _
\ba_
\bf_
\bt_
\be_
\br the current line toward the end of the
3142 file, and stopping at the first line containing
3143 a string matching the RE. (The trailing slash
3144 can be omitted at the end of the command line.)
3146 If no RE is specified, i.e. the pattern is "/
\b//
\b/",
3147 the last RE used in any command is used in the
3150 If the e
\bex
\bxt
\bte
\ben
\bnd
\bde
\bed
\bd option is set, the RE is handled
3151 as an extended RE, not a basic RE. If the w
\bwr
\bra
\bap
\bp-
\b-
3152 s
\bsc
\bca
\ban
\bn option is set, the search wraps around to
3153 the beginning of the file and continues up to
3154 and including the current line, so that the
3155 entire file is searched.
3157 The form "\
\b\/
\b/" is accepted for historic reasons,
3158 and is identical to "/
\b//
\b/".
3160 (6) An RE enclosed in question marks ("?
\b?")
3161 addresses the first line found by searching
3162 backward from the line _
\bp_
\br_
\be_
\bc_
\be_
\bd_
\bi_
\bn_
\bg the current
3173 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-4
\b49
\b9
3176 line, toward the beginning of the file and stop-
3177 ping at the first line containing a string
3178 matching the RE. (The trailing question mark
3179 can be omitted at the end of a command line.)
3181 If no RE is specified, i.e. the pattern is "?
\b??
\b?",
3182 the last RE used in any command is used in the
3185 If the e
\bex
\bxt
\bte
\ben
\bnd
\bde
\bed
\bd option is set, the RE is handled
3186 as an extended RE, not a basic RE. If the w
\bwr
\bra
\bap
\bp-
\b-
3187 s
\bsc
\bca
\ban
\bn option is set, the search wraps around
3188 from the beginning of the file to the end of the
3189 file and continues up to and including the cur-
3190 rent line, so that the entire file is searched.
3192 The form "\
\b\?
\b?" is accepted for historic reasons,
3193 and is identical to "?
\b??
\b?".
3195 (7) An address followed by a plus sign ("+
\b+") or a
3196 minus sign ("-
\b-") followed by a number is an off-
3197 set address and refers to the address plus (or
3198 minus) the indicated number of lines. If the
3199 address is omitted, the addition or subtraction
3200 is done with respect to the current line.
3202 (8) An address of "+
\b+" or "-
\b-" followed by a number is
3203 an offset from the current line. For example,
3204 "-
\b-5
\b5" is the same as ".
\b.-
\b-5
\b5".
3206 (9) An address ending with "+
\b+" or "-
\b-" has 1 added to
3207 or subtracted from the address, respectively.
3208 As a consequence of this rule and of the previ-
3209 ous rule, the address "-
\b-" refers to the line
3210 preceding the current line. Moreover, trailing
3211 "+
\b+" and "-
\b-" characters have a cumulative effect.
3212 For example, "+
\b++
\b+-
\b-+
\b++
\b+" refers to the current line
3215 (10) A percent sign ("%
\b%") is equivalent to the
3216 address range "1
\b1,
\b,$
\b$".
3218 E
\bEx
\bx commands require zero, one, or two addresses.
3219 It is an error to specify an address to a command which
3220 requires zero addresses.
3222 If the user provides more than the expected number
3223 of addresses to any e
\bex
\bx command, the first addresses
3224 specified are discarded. For example, "1
\b1,
\b,2
\b2,
\b,3
\b3,
\b,5
\b5"print
3225 prints lines 3 through 5, because the p
\bpr
\bri
\bin
\bnt
\bt command
3226 only takes two addresses.
3239 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-5
\b50
\b0 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be
3242 The addresses in a range are separated from each
3243 other by a comma (",
\b,") or a semicolon (";
\b;"). In the
3244 latter case, the current line (".
\b.") is set to the
3245 first address, and only then is the second address cal-
3246 culated. This feature can be used to determine the
3247 starting line for forward and backward searches (see
3248 rules (5) and (6) above). The second address of any
3249 two-address sequence corresponds to a line that fol-
3250 lows, in the file, the line corresponding to the first
3251 address. The first address must be less than or equal
3252 to the second address. The first address must be
3253 greater than or equal to the first line of the file,
3254 and the last address must be less than or equal to the
3255 last line of the file.
3257 1
\b13
\b3.
\b. E
\bEx
\bx D
\bDe
\bes
\bsc
\bcr
\bri
\bip
\bpt
\bti
\bio
\bon
\bn
3259 The following words have special meanings for e
\bex
\bx
3262 <
\b<e
\beo
\bof
\bf>
\b>
3263 The end-of-file character is used to scroll the
3264 screen in the e
\bex
\bx editor. This character is nor-
3265 mally <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-D
\bD>
\b>, however, whatever character is
3266 set for the current terminal is used.
3269 A single-line address, given in any of the forms
3270 described in the section entitled "E
\bEx
\bx A
\bAd
\bdd
\bdr
\bre
\bes
\bss
\bsi
\bin
\bng
\bg".
3271 The default for l
\bli
\bin
\bne
\be is the current line.
3273 r
\bra
\ban
\bng
\bge
\be
3274 A line, or a pair of line addresses, separated by
3275 a comma or semicolon. (See the section entitled
3276 "E
\bEx
\bx A
\bAd
\bdd
\bdr
\bre
\bes
\bss
\bsi
\bin
\bng
\bg" for more information.) The
3277 default for range is the current line _
\bo_
\bn_
\bl_
\by, i.e.
3278 ".
\b.,
\b,.
\b.". A percent sign ("%
\b%") stands for the range
3279 "1
\b1,
\b,$
\b$". The starting address must be less than, or
3280 equal to, the ending address.
3282 c
\bco
\bou
\bun
\bnt
\bt
3283 A positive integer, specifying the number of lines
3284 to be affected by the command; the default is 1.
3285 Generally, a count past the end-of-file may be
3286 specified, e.g. the command "p
\bp 3
\b30
\b00
\b00
\b0" in a 10 line
3287 file is acceptable, and will print from the cur-
3288 rent line through the last line in the file.
3290 f
\bfl
\bla
\bag
\bgs
\bs
3291 One or more of the characters "#", "p", and "l".
3292 When a command that accepts these flags completes,
3293 the addressed line(s) are written out as if by the
3294 corresponding #
\b#, l
\bl or p
\bp commands. In addition,
3305 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(E
\bEx
\bx C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b) U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-5
\b51
\b1
3308 any number of "+
\b+" or "-
\b-" characters can be speci-
3309 fied before, after, or during the flags, in which
3310 case the line written is not necessarily the one
3311 affected by the command, but rather the line
3312 addressed by the offset address specified. The
3313 default for f
\bfl
\bla
\bag
\bgs
\bs is none.
3316 A pattern used to derive a pathname; the default
3317 is the current file. File names are subjected to
3318 normal _
\bs_
\bh(1) word expansions.
3320 Anywhere a file name is specified, it is also pos-
3321 sible to use the special string "/
\b/t
\btm
\bmp
\bp". This will be
3322 replaced with a temporary file name which can be used
3323 for temporary work, e.g. ":
\b:e
\be /
\b/t
\btm
\bmp
\bp" creates and edits a
3326 If both a count and a range are specified for com-
3327 mands that use either, the starting line for the com-
3328 mand is the _
\bl_
\ba_
\bs_
\bt line addressed by the range, and
3329 c
\bco
\bou
\bun
\bnt
\bt- subsequent lines are affected by the command,
3330 e.g. the command "2
\b2,
\b,3
\b3p
\bp4
\b4" prints out lines 3, 4, 5 and
3333 When only a line or range is specified, with no
3334 command, the implied command is either a l
\bli
\bis
\bst
\bt, n
\bnu
\bum
\bmb
\bbe
\ber
\br
3335 or p
\bpr
\bri
\bin
\bnt
\bt command. The command used is the most recent
3336 of the three commands to have been used (including any
3337 use as a flag). If none of these commands have been
3338 used before, the p
\bpr
\bri
\bin
\bnt
\bt command is the implied command.
3339 When no range or count is specified and the command
3340 line is a blank line, the current line is incremented
3341 by 1 and then the current line is displayed.
3343 Zero or more whitespace characters may precede or
3344 follow the addresses, count, flags, or command name.
3345 Any object following a command name (such as buffer,
3346 file, etc.), that begins with an alphabetic character,
3347 should be separated from the command name by at least
3348 one whitespace character.
3350 Any character, including <
\b<c
\bca
\bar
\brr
\bri
\bia
\bag
\bge
\be-
\b-r
\bre
\bet
\btu
\bur
\brn
\bn>
\b>, "%
\b%"
3351 and "#
\b#" retain their literal value when preceded by a
3354 1
\b14
\b4.
\b. E
\bEx
\bx C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs
3356 The following section describes the commands
3357 available in the e
\bex
\bx editor. In each entry below, the
3358 tag line is a usage synopsis for the command.
3371 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-5
\b52
\b2 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(E
\bEx
\bx C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b)
3374 Each command can be entered as the abbreviation
3375 (those characters in the synopsis command word preced-
3376 ing the "[" character), the full command (all charac-
3377 ters shown for the command word, omitting the "[" and
3378 "]" characters), or any leading subset of the full com-
3379 mand down to the abbreviation. For example, the args
3380 command (shown as "a
\bar
\br[
\b[g
\bgs
\bs]
\b]" in the synopsis) can be
3381 entered as "a
\bar
\br", "a
\bar
\brg
\bg" or "a
\bar
\brg
\bgs
\bs".
3383 Each e
\bex
\bx command described below notes the new cur-
3384 rent line after it is executed, as well as any options
3385 that affect the command.
3388 A comment. Command lines beginning with the dou-
3389 ble-quote character (""
\b"") are ignored. This per-
3390 mits comments in editor scripts and startup files.
3392 <
\b<e
\ben
\bnd
\bd-
\b-o
\bof
\bf-
\b-f
\bfi
\bil
\ble
\be>
\b>
3393 Scroll the screen. Write the next N lines, where
3394 N is the value of the s
\bsc
\bcr
\bro
\bol
\bll
\bl option. The command
3395 is the end-of-file terminal character, which may
3396 be different on different terminals. Tradition-
3397 ally, it is the <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-D
\bD>
\b> key.
3399 Historically, the e
\beo
\bof
\bf command ignored any preced-
3400 ing count, and the <
\b<e
\ben
\bnd
\bd-
\b-o
\bof
\bf-
\b-f
\bfi
\bil
\ble
\be>
\b> character was
3401 ignored unless it was entered as the first charac-
3402 ter of the command. This implementation treats it
3403 as a command _
\bo_
\bn_
\bl_
\by if entered as the first charac-
3404 ter of the command line, and otherwise treats it
3405 as any other character.
3407 Line: Set to the last line written.
3410 !
\b! a
\bar
\brg
\bgu
\bum
\bme
\ben
\bnt
\bt(
\b(s
\bs)
\b)
3411 [
\b[r
\bra
\ban
\bng
\bge
\be]
\b]!
\b! a
\bar
\brg
\bgu
\bum
\bme
\ben
\bnt
\bt(
\b(s
\bs)
\b)
3412 Execute a shell command, or filter lines through a
3413 shell command. In the first synopsis, the remain-
3414 der of the line after the "!
\b!" character is passed
3415 to the program named by the s
\bsh
\bhe
\bel
\bll
\bl option, as a
3418 Within the rest of the line, "%
\b%" and "#
\b#" are
3419 expanded into the current and alternate pathnames,
3420 respectively. The character "!
\b!" is expanded with
3421 the command text of the previous !
\b! command.
3422 (Therefore, the command !
\b!!
\b! repeats the previous !
\b!
3423 command.) The special meanings of "%
\b%", "#
\b#", and
3424 "!
\b!" can be overridden by escaping them with a
3425 backslash. If no !
\b! or :
\b:!
\b! command has yet been
3426 executed, it is an error to use an unescaped "!
\b!"
3437 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(E
\bEx
\bx C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b) U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-5
\b53
\b3
3440 character. The !
\b! command does _
\bn_
\bo_
\bt do shell
3441 expansion on the strings provided as arguments.
3442 If any of the above expansions change the command
3443 the user entered, the command is redisplayed at
3444 the bottom of the screen.
3446 E
\bEx
\bx then executes the program named by the s
\bsh
\bhe
\bel
\bll
\bl
3447 option, with a -
\b-c
\bc flag followed by the arguments
3448 (which are bundled into a single argument).
3450 The !
\b! command is permitted in an empty file.
3452 If the file has been modified since it was last
3453 completely written, the command will warn you.
3455 A single "!
\b!" character is displayed when the com-
3458 In the second form of the !
\b! command, the remain-
3459 der of the line after the "!
\b!" is passed to the
3460 program named by the s
\bsh
\bhe
\bel
\bll
\bl option, as described
3461 above. The specified lines are passed to the pro-
3462 gram as standard input, and the standard and stan-
3463 dard error output of the program replace the orig-
3466 Line: Unchanged if no range was specified, oth-
3467 erwise set to the first line of the
3469 Options: Affected by the a
\bau
\but
\bto
\bow
\bwr
\bri
\bit
\bte
\be and w
\bwr
\bri
\bit
\bte
\bea
\ban
\bny
\by
3472 [
\b[r
\bra
\ban
\bng
\bge
\be]
\b] n
\bnu
\bu[
\b[m
\bmb
\bbe
\ber
\br]
\b] [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] [
\b[f
\bfl
\bla
\bag
\bgs
\bs]
\b]
3473 [
\b[r
\bra
\ban
\bng
\bge
\be]
\b] #
\b# [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] [
\b[f
\bfl
\bla
\bag
\bgs
\bs]
\b]
3474 Display the selected lines, each preceded with its
3477 The line number format is "%6d", followed by two
3480 Line: Set to the last line displayed.
3483 @
\b@ b
\bbu
\buf
\bff
\bfe
\ber
\br
3484 *
\b* b
\bbu
\buf
\bff
\bfe
\ber
\br
3485 Execute a buffer. Each line in the named buffer
3486 is executed as an e
\bex
\bx command. If no buffer is
3487 specified, or if the specified buffer is "@
\b@" or
3488 "*
\b*", the last buffer executed is used.
3490 [
\b[r
\bra
\ban
\bng
\bge
\be]
\b] <
\b<[
\b[<
\b< .
\b..
\b..
\b.]
\b] [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] [
\b[f
\bfl
\bla
\bag
\bgs
\bs]
\b]
3491 Shift lines left or right. The specified lines
3492 are shifted to the left (for the <
\b< command) or
3503 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-5
\b54
\b4 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(E
\bEx
\bx C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b)
3506 right (for the >
\b> command), by the number of
3507 columns specified by the s
\bsh
\bhi
\bif
\bft
\btw
\bwi
\bid
\bdt
\bth
\bh option. Only
3508 leading whitespace characters are deleted when
3509 shifting left; once the first column of the line
3510 contains a nonblank character, the s
\bsh
\bhi
\bif
\bft
\bt command
3511 will succeed, but the line will not be modified.
3513 If the command character <
\b< or >
\b> is repeated more
3514 than once, the command is repeated once for each
3515 additional command character.
3517 Line: If the current line is set to one of the
3518 lines that are affected by the command,
3519 it is unchanged. Otherwise, it is set to
3520 the first nonblank character of the low-
3521 est numbered line shifted.
3522 Options: Affected by the s
\bsh
\bhi
\bif
\bft
\btw
\bwi
\bid
\bdt
\bth
\bh option.
3524 [
\b[l
\bli
\bin
\bne
\be]
\b] =
\b= [
\b[f
\bfl
\bla
\bag
\bgs
\bs]
\b]
3525 Display the line number. Display the line number
3526 of l
\bli
\bin
\bne
\be (which defaults to the last line in the
3532 [
\b[r
\bra
\ban
\bng
\bge
\be]
\b] >
\b>[
\b[>
\b> .
\b..
\b..
\b.]
\b] [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] [
\b[f
\bfl
\bla
\bag
\bgs
\bs]
\b]
3533 Shift right. The specified lines are shifted to
3534 the right by the number of columns specified by
3535 the s
\bsh
\bhi
\bif
\bft
\btw
\bwi
\bid
\bdt
\bth
\bh option, by inserting tab and space
3536 characters. Empty lines are not changed.
3538 If the command character ">
\b>" is repeated more than
3539 once, the command is repeated once for each addi-
3540 tional command character.
3542 Line: Set to the last line modified by the com-
3546 a
\bab
\bb[
\b[b
\bbr
\bre
\bev
\bv]
\b] l
\blh
\bhs
\bs r
\brh
\bhs
\bs
3547 Add an abbreviation to the current abbreviation
3548 list. In v
\bvi
\bi, if l
\blh
\bhs
\bs is entered such that it is
3549 preceded and followed by characters that cannot be
3550 part of a word, it is replaced by the string r
\brh
\bhs
\bs.
3555 [
\b[l
\bli
\bin
\bne
\be]
\b] a
\ba[
\b[p
\bpp
\bpe
\ben
\bnd
\bd]
\b][
\b[!
\b!]
\b]
3556 The input text is appended to the specified line.
3557 If line 0 is specified, the text is inserted at
3558 the beginning of the file. Set to the last line
3569 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(E
\bEx
\bx C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b) U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-5
\b55
\b5
3572 input. If no lines are input, then set to l
\bli
\bin
\bne
\be,
3573 or to the first line of the file if a l
\bli
\bin
\bne
\be of 0
3574 was specified. Following the command name with a
3575 "!
\b!" character causes the a
\bau
\but
\bto
\boi
\bin
\bnd
\bde
\ben
\bnt
\bt option to be
3576 toggled for the duration of the command.
3579 Options: Affected by the a
\bal
\blt
\btw
\bwe
\ber
\bra
\bas
\bse
\be, a
\bau
\but
\bto
\boi
\bin
\bnd
\bde
\ben
\bnt
\bt,
3580 b
\bbe
\bea
\bau
\but
\bti
\bif
\bfy
\by, s
\bsh
\bho
\bow
\bwm
\bma
\bat
\btc
\bch
\bh, t
\btt
\bty
\byw
\bwe
\ber
\bra
\bas
\bse
\be and w
\bwr
\bra
\bap
\bp-
\b-
3581 m
\bma
\bar
\brg
\bgi
\bin
\bn options.
3583 a
\bar
\br[
\b[g
\bgs
\bs]
\b]
3584 Display the argument list. The current argument
3585 is displayed inside of "[
\b[" and "]
\b]" characters.
3586 The argument list is the list of operands speci-
3587 fied on startup, which can be replaced using the
3588 n
\bne
\bex
\bxt
\bt command.
3594 V
\bVi
\bi mode only. Background the current screen.
3596 Line: Set to the current line when the screen
3600 [
\b[r
\bra
\ban
\bng
\bge
\be]
\b] c
\bc[
\b[h
\bha
\ban
\bng
\bge
\be]
\b][
\b[!
\b!]
\b] [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b]
3601 Replace the lines with input text. Following the
3602 command name with a "!
\b!" character causes the
3603 a
\bau
\but
\bto
\boi
\bin
\bnd
\bde
\ben
\bnt
\bt option to be toggled for the duration
3606 Line: Set to the last line input, or, if no
3607 lines were input, set to the line before
3608 the target line, or to the first line of
3609 the file if there are no lines preceding
3611 Options: Affected by the a
\bal
\blt
\btw
\bwe
\ber
\bra
\bas
\bse
\be, a
\bau
\but
\bto
\boi
\bin
\bnd
\bde
\ben
\bnt
\bt,
3612 b
\bbe
\bea
\bau
\but
\bti
\bif
\bfy
\by, s
\bsh
\bho
\bow
\bwm
\bma
\bat
\btc
\bch
\bh, t
\btt
\bty
\byw
\bwe
\ber
\bra
\bas
\bse
\be and w
\bwr
\bra
\bap
\bp-
\b-
3613 m
\bma
\bar
\brg
\bgi
\bin
\bn options.
3615 c
\bch
\bhd
\bd[
\b[i
\bir
\br]
\b][
\b[!
\b!]
\b] [
\b[d
\bdi
\bir
\bre
\bec
\bct
\bto
\bor
\bry
\by]
\b]
3616 c
\bcd
\bd[
\b[!
\b!]
\b] [
\b[d
\bdi
\bir
\bre
\bec
\bct
\bto
\bor
\bry
\by]
\b]
3617 Change the current working directory. The d
\bdi
\bir
\bre
\bec
\bc-
\b-
3618 t
\bto
\bor
\bry
\by argument is subjected to _
\bs_
\bh(1) word expan-
3619 sions. When invoked with no directory argument
3620 and the H
\bHO
\bOM
\bME
\bE environment variable is set, the
3621 directory named by the H
\bHO
\bOM
\bME
\bE environment variable
3622 becomes the new current directory. Otherwise, the
3623 new current directory becomes the directory
3624 returned by the _
\bg_
\be_
\bt_
\bp_
\bw_
\be_
\bn_
\bt(3) routine.
3635 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-5
\b56
\b6 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(E
\bEx
\bx C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b)
3638 The c
\bch
\bhd
\bdi
\bir
\br command will fail if the file has been
3639 modified since the last complete write of the
3640 file. You can override this check by appending a
3641 "!
\b!" character to the command.
3644 Options: Affected by the c
\bcd
\bdp
\bpa
\bat
\bth
\bh option.
3646 [
\b[r
\bra
\ban
\bng
\bge
\be]
\b] c
\bco
\bo[
\b[p
\bpy
\by]
\b] l
\bli
\bin
\bne
\be [
\b[f
\bfl
\bla
\bag
\bgs
\bs]
\b]
3647 [
\b[r
\bra
\ban
\bng
\bge
\be]
\b] t
\bt l
\bli
\bin
\bne
\be [
\b[f
\bfl
\bla
\bag
\bgs
\bs]
\b]
3648 Copy the specified lines (range) after the desti-
3649 nation line. Line 0 may be specified to insert
3650 the lines at the beginning of the file.
3655 [
\b[r
\bra
\ban
\bng
\bge
\be]
\b] d
\bd[
\b[e
\bel
\ble
\bet
\bte
\be]
\b] [
\b[b
\bbu
\buf
\bff
\bfe
\ber
\br]
\b] [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] [
\b[f
\bfl
\bla
\bag
\bgs
\bs]
\b]
3656 Delete the lines from the file. The deleted text
3657 is saved in the specified buffer, or, if no buffer
3658 is specified, in the unnamed buffer. If the com-
3659 mand name is followed by a letter that could be
3660 interpreted as either a buffer name or a flag
3661 value (because neither a c
\bco
\bou
\bun
\bnt
\bt or f
\bfl
\bla
\bag
\bgs
\bs values
3662 were given), e
\bex
\bx treats the letter as a f
\bfl
\bla
\bag
\bgs
\bs value
3663 if the letter immediately follows the command
3664 name, without any whitespace separation. If the
3665 letter is preceded by whitespace characters, it
3666 treats it as a buffer name.
3668 Line: Set to the line following the deleted
3669 lines, or to the last line if the deleted
3670 lines were at the end.
3673 d
\bdi
\bi[
\b[s
\bsp
\bpl
\bla
\bay
\by]
\b] b
\bb[
\b[u
\buf
\bff
\bfe
\ber
\brs
\bs]
\b] |
\b| s
\bs[
\b[c
\bcr
\bre
\bee
\ben
\bns
\bs]
\b] |
\b| t
\bt[
\b[a
\bag
\bgs
\bs]
\b]
3674 Display buffers, screens or tags. The d
\bdi
\bis
\bsp
\bpl
\bla
\bay
\by
3675 command takes one of three additional arguments,
3676 which are as follows:
3679 Display all buffers (including named,
3680 unnamed, and numeric) that contain text.
3682 Display the file names of all background
3684 t[ags] Display the tags stack.
3689 e
\be[
\b[d
\bdi
\bit
\bt]
\b][
\b[!
\b!]
\b] [
\b[+
\b+c
\bcm
\bmd
\bd]
\b] [
\b[f
\bfi
\bil
\ble
\be]
\b]
3701 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(E
\bEx
\bx C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b) U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-5
\b57
\b7
3704 e
\bex
\bx[
\b[!
\b!]
\b] [
\b[+
\b+c
\bcm
\bmd
\bd]
\b] [
\b[f
\bfi
\bil
\ble
\be]
\b]
3705 Edit a different file. If the current buffer has
3706 been modified since the last complete write, the
3707 command will fail. You can override this by
3708 appending a "!
\b!" character to the command name.
3710 If the "+
\b+c
\bcm
\bmd
\bd" option is specified, that e
\bex
\bx command
3711 will be executed in the new file. Any e
\bex
\bx command
3712 may be used, although the most common use of this
3713 feature is to specify a line number or search pat-
3714 tern to set the initial location in the new file.
3716 Line: If you have previously edited the file,
3717 the current line will be set to your last
3718 position in the file. If that position
3719 does not exist, or you have not previ-
3720 ously edited the file, the current line
3721 will be set to the first line of the file
3722 if you are in v
\bvi
\bi mode, and the last line
3723 of the file if you are in e
\bex
\bx.
3724 Options: Affected by the a
\bau
\but
\bto
\bow
\bwr
\bri
\bit
\bte
\be and w
\bwr
\bri
\bit
\bte
\bea
\ban
\bny
\by
3727 e
\bex
\bxu
\bu[
\b[s
\bsa
\bag
\bge
\be]
\b] [
\b[c
\bco
\bom
\bmm
\bma
\ban
\bnd
\bd]
\b]
3728 Display usage for an e
\bex
\bx command. If c
\bco
\bom
\bmm
\bma
\ban
\bnd
\bd is
3729 specified, a usage statement for that command is
3730 displayed. Otherwise, usage statements for all e
\bex
\bx
3731 commands are displayed.
3736 f
\bf[
\b[i
\bil
\ble
\be]
\b] [
\b[f
\bfi
\bil
\ble
\be]
\b]
3737 Display and optionally change the file name. If a
3738 file name is specified, the current pathname is
3739 changed to the specified name. The current path-
3740 name, the number of lines, and the current posi-
3741 tion in the file are displayed.
3746 f
\bfg
\bg [
\b[n
\bna
\bam
\bme
\be]
\b]
3747 V
\bVi
\bi mode only. Foreground the specified screen.
3748 Swap the current screen with the specified back-
3749 grounded screen. If no screen is specified, the
3750 first background screen is foregrounded.
3752 Line: Set to the current line when the screen
3767 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-5
\b58
\b8 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(E
\bEx
\bx C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b)
3770 [
\b[r
\bra
\ban
\bng
\bge
\be]
\b] g
\bg[
\b[l
\blo
\bob
\bba
\bal
\bl]
\b] /
\b/p
\bpa
\bat
\btt
\bte
\ber
\brn
\bn/
\b/ [
\b[c
\bco
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs]
\b]
3771 [
\b[r
\bra
\ban
\bng
\bge
\be]
\b] v
\bv /
\b/p
\bpa
\bat
\btt
\bte
\ber
\brn
\bn/
\b/ [
\b[c
\bco
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs]
\b]
3772 Apply commands to lines matching (or not matching)
3773 a pattern. The lines within the given range that
3774 match ("g
\bg[
\b[l
\blo
\bob
\bba
\bal
\bl]
\b]"), or do not match ("v
\bv") the
3775 given pattern are selected. Then, the specified
3776 e
\bex
\bx command(s) are executed with the current line
3777 (".
\b.") set to each selected line. If no range is
3778 specified, the entire file is searched for match-
3779 ing, or not matching, lines.
3781 Multiple commands can be specified, one per line,
3782 by escaping each <
\b<n
\bne
\bew
\bwl
\bli
\bin
\bne
\be>
\b> character with a back-
3783 slash, or by separating commands with a "|
\b|" char-
3784 acter. If no commands are specified, the command
3785 defaults to the p
\bpr
\bri
\bin
\bnt
\bt command.
3787 For the a
\bap
\bpp
\bpe
\ben
\bnd
\bd, c
\bch
\bha
\ban
\bng
\bge
\be and i
\bin
\bns
\bse
\ber
\brt
\bt commands, the
3788 input text must be part of the global command
3789 line. In this case, the terminating period can be
3790 omitted if it ends the commands.
3792 The v
\bvi
\bis
\bsu
\bua
\bal
\bl command may also be specified as one of
3793 the e
\bex
\bx commands. In this mode, input is taken
3794 from the terminal. Entering a Q
\bQ command in v
\bvi
\bi
3795 mode causes the next line matching the pattern to
3796 be selected and v
\bvi
\bi to be reentered, until the list
3799 The g
\bgl
\blo
\bob
\bba
\bal
\bl, v
\bv and u
\bun
\bnd
\bdo
\bo commands cannot be used as
3800 part of these commands.
3802 The editor options a
\bau
\but
\bto
\bop
\bpr
\bri
\bin
\bnt
\bt, a
\bau
\but
\bto
\boi
\bin
\bnd
\bde
\ben
\bnt
\bt, and
3803 r
\bre
\bep
\bpo
\bor
\brt
\bt are turned off for the duration of the
3804 g
\bgl
\blo
\bob
\bba
\bal
\bl and v
\bv commands.
3806 Line: The last line modified.
3809 h
\bhe
\be[
\b[l
\blp
\bp]
\b]
3810 Display a help message.
3815 [
\b[l
\bli
\bin
\bne
\be]
\b] i
\bi[
\b[n
\bns
\bse
\ber
\brt
\bt]
\b][
\b[!
\b!]
\b]
3816 The input text is inserted before the specified
3817 line. Following the command name with a "!
\b!"
3818 character causes the a
\bau
\but
\bto
\boi
\bin
\bnd
\bde
\ben
\bnt
\bt option setting to
3819 be toggled for the duration of this command.
3821 Line: Set to the last line input; if no lines
3822 were input, set to the line before the
3833 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(E
\bEx
\bx C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b) U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-5
\b59
\b9
3836 target line, or to the first line of the
3837 file if there are no lines preceding the
3839 Options: Affected by the a
\bal
\blt
\btw
\bwe
\ber
\bra
\bas
\bse
\be, a
\bau
\but
\bto
\boi
\bin
\bnd
\bde
\ben
\bnt
\bt,
3840 b
\bbe
\bea
\bau
\but
\bti
\bif
\bfy
\by, s
\bsh
\bho
\bow
\bwm
\bma
\bat
\btc
\bch
\bh, t
\btt
\bty
\byw
\bwe
\ber
\bra
\bas
\bse
\be and w
\bwr
\bra
\bap
\bp-
\b-
3841 m
\bma
\bar
\brg
\bgi
\bin
\bn options.
3843 [
\b[r
\bra
\ban
\bng
\bge
\be]
\b] j
\bj[
\b[o
\boi
\bin
\bn]
\b][
\b[!
\b!]
\b] [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] [
\b[f
\bfl
\bla
\bag
\bgs
\bs]
\b]
3844 Join lines of text together.
3846 A c
\bco
\bou
\bun
\bnt
\bt specified to the command specifies that
3847 the last line of the r
\bra
\ban
\bng
\bge
\be plus c
\bco
\bou
\bun
\bnt
\bt subsequent
3848 lines will be joined. (Note, this differs by one
3849 from the general rule where only c
\bco
\bou
\bun
\bnt
\bt- subsequent
3850 lines are affected.)
3852 If the current line ends with a whitespace charac-
3853 ter, all whitespace is stripped from the next
3854 line. Otherwise, if the next line starts with a
3855 open parenthesis ("(
\b("), do nothing. Otherwise, if
3856 the current line ends with a question mark ("?
\b?"),
3857 period (".
\b.") or exclamation point ("!
\b!"), insert
3858 two spaces. Otherwise, insert a single space.
3860 Appending a "!
\b!" character to the command name
3861 causes a simpler join with no white-space process-
3867 [
\b[r
\bra
\ban
\bng
\bge
\be]
\b] l
\bl[
\b[i
\bis
\bst
\bt]
\b] [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] [
\b[f
\bfl
\bla
\bag
\bgs
\bs]
\b]
3868 Display the lines unambiguously. Tabs are dis-
3869 played as "^
\b^I
\bI", and the end of the line is marked
3870 with a "$
\b$" character.
3872 Line: Set to the last line displayed.
3875 m
\bma
\bap
\bp[
\b[!
\b!]
\b] [
\b[l
\blh
\bhs
\bs r
\brh
\bhs
\bs]
\b]
3876 Define or display maps (for v
\bvi
\bi only).
3878 If "l
\blh
\bhs
\bs" and "r
\brh
\bhs
\bs" are not specified, the current
3879 set of command mode maps are displayed. If a "!
\b!"
3880 character is appended to to the command, the text
3881 input mode maps are displayed.
3883 Otherwise, when the "l
\blh
\bhs
\bs" character sequence is
3884 entered in v
\bvi
\bi, the action is as if the correspond-
3885 ing "r
\brh
\bhs
\bs" had been entered. If a "!
\b!" character
3886 is appended to the command name, the mapping is
3887 effective during text input mode, otherwise, it is
3888 effective during command mode. This allows "l
\blh
\bhs
\bs"
3899 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-6
\b60
\b0 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(E
\bEx
\bx C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b)
3902 to have two different macro definitions at the
3903 same time: one for command mode and one for input
3906 Whitespace characters require escaping with a
3907 <
\b<l
\bli
\bit
\bte
\ber
\bra
\bal
\blnext> character to be entered in the l
\blh
\bhs
\bs
3908 string in visual mode.
3910 Normally, keys in the r
\brh
\bhs
\bs string are remapped (see
3911 the r
\bre
\bem
\bma
\bap
\bp option), and it is possible to create
3912 infinite loops. However, keys which map to them-
3913 selves are not further remapped, regardless of the
3914 setting of the r
\bre
\bem
\bma
\bap
\bp option. For example, the
3915 command ":
\b:m
\bma
\bap
\bp n
\bn n
\bnz
\bz.
\b." maps the "n
\bn" key to the n
\bn
3918 To exit an infinitely looping map, use the termi-
3919 nal <
\b<i
\bin
\bnt
\bte
\ber
\brr
\bru
\bup
\bpt
\bt>
\b> character.
3924 [
\b[l
\bli
\bin
\bne
\be]
\b] m
\bma
\ba[
\b[r
\brk
\bk]
\b] <
\b<c
\bch
\bha
\bar
\bra
\bac
\bct
\bte
\ber
\br>
\b>
3925 [
\b[l
\bli
\bin
\bne
\be]
\b] k
\bk <
\b<c
\bch
\bha
\bar
\bra
\bac
\bct
\bte
\ber
\br>
\b>
3926 Mark the line with the mark <
\b<c
\bch
\bha
\bar
\bra
\bac
\bct
\bte
\ber
\br>
\b>. The
3927 expressions "'
\b'<
\b<c
\bch
\bha
\bar
\bra
\bac
\bct
\bte
\ber
\br>
\b>" and "`
\b`<
\b<c
\bch
\bha
\bar
\bra
\bac
\bct
\bte
\ber
\br>
\b>" can
3928 then be used as an address in any command that
3934 [
\b[r
\bra
\ban
\bng
\bge
\be]
\b] m
\bm[
\b[o
\bov
\bve
\be]
\b] l
\bli
\bin
\bne
\be
3935 Move the specified lines after the target line. A
3936 target line of 0 places the lines at the beginning
3939 Line: Set to the first of the moved lines.
3942 m
\bmk
\bk[
\b[e
\bex
\bxr
\brc
\bc]
\b][
\b[!
\b!]
\b] f
\bfi
\bil
\ble
\be
3943 Write the abbreviations, editor options and maps
3944 to the specified file. Information is written in
3945 a form which can later be read back in using the
3946 e
\bex
\bx s
\bso
\bou
\bur
\brc
\bce
\be command. If f
\bfi
\bil
\ble
\be already exists, the
3947 m
\bmk
\bke
\bex
\bxr
\brc
\bc command will fail. This check can be over-
3948 ridden by appending a "!
\b!" character to the com-
3965 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(E
\bEx
\bx C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b) U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-6
\b61
\b1
3968 n
\bn[
\b[e
\bex
\bxt
\bt]
\b][
\b[!
\b!]
\b] [
\b[f
\bfi
\bil
\ble
\be .
\b..
\b..
\b.]
\b]
3969 Edit the next file from the argument list. The
3970 n
\bne
\bex
\bxt
\bt command will fail if the file has been modi-
3971 fied since the last complete write. This check
3972 can be overridden by appending the "!
\b!" character
3973 to the command name. The argument list can
3974 optionally be replaced by specifying a new one as
3975 arguments to this command. In this case, editing
3976 starts with the first file on the new list.
3978 Line: Set as described for the e
\bed
\bdi
\bit
\bt command.
3979 Options: Affected by the options a
\bau
\but
\bto
\bow
\bwr
\bri
\bit
\bte
\be and
3980 w
\bwr
\bri
\bit
\bte
\bea
\ban
\bny
\by.
3982 [
\b[l
\bli
\bin
\bne
\be]
\b] o
\bo[
\b[p
\bpe
\ben
\bn]
\b] /
\b/p
\bpa
\bat
\btt
\bte
\ber
\brn
\bn/
\b/ [
\b[f
\bfl
\bla
\bag
\bgs
\bs]
\b]
3983 Enter open mode. Open mode is the same as being
3984 in v
\bvi
\bi, but with a one-line window. All the stan-
3985 dard v
\bvi
\bi commands are available. If a match is
3986 found for the optional RE argument, the cursor is
3987 set to the start of the matching pattern.
3989 _
\bT_
\bh_
\bi_
\bs _
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd _
\bi_
\bs _
\bn_
\bo_
\bt _
\by_
\be_
\bt _
\bi_
\bm_
\bp_
\bl_
\be_
\bm_
\be_
\bn_
\bt_
\be_
\bd_
\b.
3991 Line: Unchanged, unless the optional RE is
3992 specified, in which case it is set to the
3993 line where the matching pattern is found.
3994 Options: Affected by the o
\bop
\bpe
\ben
\bn option.
3996 p
\bpr
\bre
\be[
\b[s
\bse
\ber
\brv
\bve
\be]
\b]
3997 Save the file in a form that can later be recov-
3998 ered using the e
\bex
\bx -
\b-r
\br option. When the file is
3999 preserved, an email message is sent to the user.
4004 p
\bpr
\bre
\bev
\bv[
\b[i
\bio
\bou
\bus
\bs]
\b][
\b[!
\b!]
\b]
4005 Edit the previous file from the argument list.
4006 The p
\bpr
\bre
\bev
\bvi
\bio
\bou
\bus
\bs command will fail if the file has
4007 been modified since the last complete write. This
4008 check can be overridden by appending the "!
\b!"
4009 character to the command name.
4011 Line: Set as described for the e
\bed
\bdi
\bit
\bt command.
4012 Options: Affected by the options a
\bau
\but
\bto
\bow
\bwr
\bri
\bit
\bte
\be and
4013 w
\bwr
\bri
\bit
\bte
\bea
\ban
\bny
\by. None.
4015 [
\b[r
\bra
\ban
\bng
\bge
\be]
\b] p
\bp[
\b[r
\bri
\bin
\bnt
\bt]
\b] [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] [
\b[f
\bfl
\bla
\bag
\bgs
\bs]
\b]
4016 Display the specified lines.
4018 Line: Set to the last line displayed.
4031 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-6
\b62
\b2 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(E
\bEx
\bx C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b)
4034 [
\b[l
\bli
\bin
\bne
\be]
\b] p
\bpu
\bu[
\b[t
\bt]
\b] [
\b[b
\bbu
\buf
\bff
\bfe
\ber
\br]
\b]
4035 Append buffer contents to the current line. If a
4036 buffer is specified, its contents are appended to
4037 the line, otherwise, the contents of the unnamed
4040 Line: Set to the line after the current line.
4043 q
\bq[
\b[u
\bui
\bit
\bt]
\b][
\b[!
\b!]
\b]
4044 End the editing session. If the file has been
4045 modified since the last complete write, the q
\bqu
\bui
\bit
\bt
4046 command will fail. This check may be overridden
4047 by appending a "!
\b!" character to the command.
4049 If there are more files to edit, the q
\bqu
\bui
\bit
\bt command
4050 will fail. Appending a "!
\b!" character to the com-
4051 mand name or entering two q
\bqu
\bui
\bit
\bt commands (i.e. w
\bwq
\bq,
4052 q
\bqu
\bui
\bit
\bt, x
\bxi
\bit
\bt or Z
\bZZ
\bZ) in a row) will override this
4053 check and the editor will exit.
4058 [
\b[l
\bli
\bin
\bne
\be]
\b] r
\br[
\b[e
\bea
\bad
\bd]
\b][
\b[!
\b!]
\b] [
\b[f
\bfi
\bil
\ble
\be]
\b]
4059 Read a file. A copy of the specified file is
4060 appended to the line. If l
\bli
\bin
\bne
\be is 0, the copy is
4061 inserted at the beginning of the file. If no file
4062 is specified, the current file is read; if there
4063 is no current file, then f
\bfi
\bil
\ble
\be becomes the current
4064 file. If there is no current file and no f
\bfi
\bil
\ble
\be is
4065 specified, then the r
\bre
\bea
\bad
\bd command will fail.
4067 If f
\bfi
\bil
\ble
\be is preceded by a "!
\b!" character, f
\bfi
\bil
\ble
\be is
4068 treated as if it were a shell command, and passed
4069 to the program named by the S
\bSH
\bHE
\bEL
\bLL
\bL environment
4070 variable. The standard and standard error outputs
4071 of that command are read into the file after the
4072 specified line. The special meaning of the "!
\b!"
4073 character can be overridden by escaping it with a
4074 backslash ("\
\b\") character.
4076 Line: When executed from e
\bex
\bx, the current line
4077 is set to the last line read. When exe-
4078 cuted from v
\bvi
\bi, the current line is set to
4079 the first line read.
4082 r
\bre
\bec
\bc[
\b[o
\bov
\bve
\ber
\br]
\b] f
\bfi
\bil
\ble
\be
4083 Recover f
\bfi
\bil
\ble
\be if it was previously saved. If no
4084 saved file by that name exists, the r
\bre
\bec
\bco
\bov
\bve
\ber
\br com-
4085 mand behaves similarly to the e
\bed
\bdi
\bit
\bt command.
4097 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(E
\bEx
\bx C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b) U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-6
\b63
\b3
4100 Line: Set as described for the e
\bed
\bdi
\bit
\bt command.
4103 r
\bre
\bes
\bs[
\b[i
\biz
\bze
\be]
\b] [
\b[+
\b+|
\b|-
\b-]
\b]s
\bsi
\biz
\bze
\be
4104 V
\bVi
\bi mode only. Grow or shrink the current screen.
4105 If s
\bsi
\biz
\bze
\be is a positive, signed number, the current
4106 screen is grown by that many lines. If s
\bsi
\biz
\bze
\be is a
4107 negative, signed number, the current screen is
4108 shrunk by that many lines. If s
\bsi
\biz
\bze
\be is not signed,
4109 the current screen is set to the specified s
\bsi
\biz
\bze
\be.
4110 Applicable only to split screens.
4115 r
\bre
\bew
\bw[
\b[i
\bin
\bnd
\bd]
\b][
\b[!
\b!]
\b]
4116 Rewind the argument list. If the current file has
4117 been modified since the last complete write, the
4118 r
\bre
\bew
\bwi
\bin
\bnd
\bd command will fail. This check may be over-
4119 ridden by appending the "!
\b!" character to the com-
4122 Otherwise, the current file is set to the first
4123 file in the argument list.
4125 Line: Set as described for the e
\bed
\bdi
\bit
\bt command.
4126 Options: Affected by the a
\bau
\but
\bto
\bow
\bwr
\bri
\bit
\bte
\be and w
\bwr
\bri
\bit
\bte
\bea
\ban
\bny
\by
4129 s
\bse
\be[
\b[t
\bt]
\b] [
\b[o
\bop
\bpt
\bti
\bio
\bon
\bn[
\b[=
\b=[
\b[v
\bva
\bal
\blu
\bue
\be]
\b]]
\b] .
\b..
\b..
\b.]
\b] [
\b[n
\bno
\boo
\bop
\bpt
\bti
\bio
\bon
\bn .
\b..
\b..
\b.]
\b] [
\b[o
\bop
\bpt
\bti
\bio
\bon
\bn?
\b?
4130 .
\b..
\b..
\b.]
\b] [
\b[a
\bal
\bll
\bl]
\b]
4131 Display or set editor options. When no arguments
4132 are specified, the editor option t
\bte
\ber
\brm
\bm, and any
4133 editor options whose values have been changed from
4134 the default settings are displayed. If the argu-
4135 ment a
\bal
\bll
\bl is specified, the values of all of editor
4136 options are displayed.
4138 Specifying an option name followed by the charac-
4139 ter "?
\b?" causes the current value of that option
4140 to be displayed. The "?
\b?" can be separated from
4141 the option name by whitespace characters. The "?
\b?"
4142 is necessary only for Boolean valued options.
4143 Boolean options can be given values by the form
4144 "s
\bse
\bet
\bt o
\bop
\bpt
\bti
\bio
\bon
\bn" to turn them on, or "s
\bse
\bet
\bt n
\bno
\boo
\bop
\bpt
\bti
\bio
\bon
\bn" to
4145 turn them off. String and numeric options can be
4146 assigned by the form "s
\bse
\bet
\bt o
\bop
\bpt
\bti
\bio
\bon
\bn=
\b=v
\bva
\bal
\blu
\bue
\be". Any
4147 whitespace characters in strings can be included
4148 literally by preceding each with a backslash.
4149 More than one option can be set or listed by a
4150 single set command, by specifying multiple argu-
4151 ments, each separated from the next by whitespace
4163 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-6
\b64
\b4 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(E
\bEx
\bx C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b)
4169 s
\bsh
\bh[
\b[e
\bel
\bll
\bl]
\b]
4170 Run a shell program. The program named by the
4171 s
\bsh
\bhe
\bel
\bll
\bl option is run with a -
\b-i
\bi (for interactive)
4172 flag. Editing is resumed when that program exits.
4177 s
\bso
\bo[
\b[u
\bur
\brc
\bce
\be]
\b] f
\bfi
\bil
\ble
\be
4178 Read and execute e
\bex
\bx commands from a file. S
\bSo
\bou
\bur
\brc
\bce
\be
4179 commands may be nested.
4184 s
\bsp
\bp[
\b[l
\bli
\bit
\bt]
\b] [
\b[f
\bfi
\bil
\ble
\be .
\b..
\b..
\b.]
\b]
4185 V
\bVi
\bi mode only. Split the screen. The current
4186 screen is split into two screens, of approximately
4187 equal size. If the cursor is in the lower half of
4188 the screen, the screen will split up, i.e. the new
4189 screen will be above the old one. If the cursor
4190 is in the upper half of the screen, the new screen
4191 will be below the old one.
4193 If f
\bfi
\bil
\ble
\be is specified, the new screen is editing
4194 that file, otherwise, both screens are editing the
4195 same file, and changes in each will be be
4196 reflected in the other. The argument list for the
4197 new screen consists of the list of files specified
4198 as arguments to this command, or, the current
4199 pathname if no files are specified.
4201 Line: If f
\bfi
\bil
\ble
\be is specified, set as for the e
\bed
\bdi
\bit
\bt
4202 command, otherwise unchanged.
4205 [
\b[r
\bra
\ban
\bng
\bge
\be]
\b] s
\bs[
\b[u
\bub
\bbs
\bst
\bti
\bit
\btu
\but
\bte
\be]
\b] [
\b[/
\b/p
\bpa
\bat
\btt
\bte
\ber
\brn
\bn/
\b/r
\bre
\bep
\bpl
\bla
\bac
\bce
\be/
\b/]
\b] [
\b[o
\bop
\bpt
\bti
\bio
\bon
\bns
\bs]
\b]
4206 [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] [
\b[f
\bfl
\bla
\bag
\bgs
\bs]
\b]
4207 [
\b[r
\bra
\ban
\bng
\bge
\be]
\b] &
\b& [
\b[o
\bop
\bpt
\bti
\bio
\bon
\bns
\bs]
\b] [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] [
\b[f
\bfl
\bla
\bag
\bgs
\bs]
\b]
4208 [
\b[r
\bra
\ban
\bng
\bge
\be]
\b] ~
\b~ [
\b[o
\bop
\bpt
\bti
\bio
\bon
\bns
\bs]
\b] [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] [
\b[f
\bfl
\bla
\bag
\bgs
\bs]
\b]
4209 Make substitutions. Replace the first instance of
4210 p
\bpa
\bat
\btt
\bte
\ber
\brn
\bn with the string r
\bre
\bep
\bpl
\bla
\bac
\bce
\be on the specified
4211 line(s). If the "/
\b/p
\bpa
\bat
\btt
\bte
\ber
\brn
\bn/
\b/r
\bre
\bep
\bpl
\bl/
\b/" argument is not
4212 specified, the "/
\b/p
\bpa
\bat
\btt
\bte
\ber
\brn
\bn/
\b/r
\bre
\bep
\bpl
\bl/
\b/" from the previous
4213 s
\bsu
\bub
\bbs
\bst
\bti
\bit
\btu
\but
\bte
\be command is used.
4215 If o
\bop
\bpt
\bti
\bio
\bon
\bns
\bs includes the letter "c
\bc" (confirm), you
4216 will be prompted for confirmation before each
4217 replacement is done. An affirmative response (in
4218 English, a "y
\by" character) causes the replacement
4229 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(E
\bEx
\bx C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b) U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-6
\b65
\b5
4232 to be made. A quit response (in English, a "q
\bq"
4233 character) causes the s
\bsu
\bub
\bbs
\bst
\bti
\bit
\btu
\but
\bte
\be command to be
4234 terminated. Any other response causes the
4235 replacement not to be made, and the s
\bsu
\bub
\bbs
\bst
\bti
\bit
\btu
\but
\bte
\be
4236 command continues. If o
\bop
\bpt
\bti
\bio
\bon
\bns
\bs includes the letter
4237 "g
\bg" (global), all nonoverlapping instances of p
\bpa
\bat
\bt-
\b-
4238 t
\bte
\ber
\brn
\bn in the line are replaced.
4240 The &
\b& version of the command is the same as not
4241 specifying a pattern or replacement string to the
4242 s
\bsu
\bub
\bbs
\bst
\bti
\bit
\btu
\but
\bte
\be command, and the "&
\b&" is replaced by the
4243 pattern and replacement information from the pre-
4244 vious substitute command.
4246 The ~
\b~ version of the command is the same as &
\b& and
4247 s
\bs, except that the search pattern used is the last
4248 RE used in _
\ba_
\bn_
\by command, not necessarily the one
4249 used in the last s
\bsu
\bub
\bbs
\bst
\bti
\bit
\btu
\but
\bte
\be command.
4251 For example, in the sequence
4253 s
\bs/
\b/r
\bre
\bed
\bd/
\b/b
\bbl
\blu
\bue
\be/
\b/
4254 /
\b/g
\bgr
\bre
\bee
\ben
\bn
4257 the "~
\b~" is equivalent to "s
\bs/
\b/g
\bgr
\bre
\bee
\ben
\bn/
\b/b
\bbl
\blu
\bue
\be/
\b/".
4259 The s
\bsu
\bub
\bbs
\bst
\bti
\bit
\btu
\but
\bte
\be command may be interrupted, using
4260 the terminal interrupt character. All substitu-
4261 tions completed before the interrupt are retained.
4263 Line: Set to the last line upon which a substi-
4267 s
\bsu
\bu[
\b[s
\bsp
\bpe
\ben
\bnd
\bd]
\b][
\b[!
\b!]
\b]
4268 s
\bst
\bt[
\b[o
\bop
\bp]
\b][
\b[!
\b!]
\b]
4269 <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-Z
\bZ>
\b>
4270 Suspend the edit session. Appending a "!
\b!" char-
4271 acter to these commands turns off the a
\bau
\but
\bto
\bow
\bwr
\bri
\bit
\bte
\be
4272 option for the command.
4275 Options: Affected by the a
\bau
\but
\bto
\bow
\bwr
\bri
\bit
\bte
\be option.
4277 t
\bta
\ba[
\b[g
\bg]
\b][
\b[!
\b!]
\b] t
\bta
\bag
\bgs
\bst
\btr
\bri
\bin
\bng
\bg
4278 Edit the file containing the specified tag.
4279 Search for the tagstring, which can be in a dif-
4280 ferent file. If the tag is in a different file,
4281 then the new file is edited. If the current file
4282 has been modified since the last complete write,
4283 the t
\bta
\bag
\bg command will fail. This check can be
4284 overridden by appending the "!
\b!" character to the
4295 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-6
\b66
\b6 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(E
\bEx
\bx C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b)
4300 The t
\bta
\bag
\bg command searches for t
\bta
\bag
\bgs
\bst
\btr
\bri
\bin
\bng
\bg in the tags
4301 file(s) specified by the option. (See _
\bc_
\bt_
\ba_
\bg_
\bs(1)
4302 for more information on tags files.)
4304 Line: Set to the line indicated by the tag.
4305 Options: Affected by the a
\bau
\but
\bto
\bow
\bwr
\bri
\bit
\bte
\be, t
\bta
\bag
\bgl
\ble
\ben
\bng
\bgt
\bth
\bh,
4306 t
\bta
\bag
\bgs
\bs and w
\bwr
\bri
\bit
\bte
\bea
\ban
\bny
\by options.
4308 t
\bta
\bag
\bgp
\bp[
\b[o
\bop
\bp]
\b][
\b[!
\b!]
\b] [
\b[f
\bfi
\bil
\ble
\be |
\b| n
\bnu
\bum
\bmb
\bbe
\ber
\br]
\b]
4309 Pop to the specified tag in the tags stack. If
4310 neither f
\bfi
\bil
\ble
\be or n
\bnu
\bum
\bmb
\bbe
\ber
\br is specified, the t
\bta
\bag
\bgp
\bpo
\bop
\bp
4311 command pops to the most recent entry on the tags
4312 stack. If f
\bfi
\bil
\ble
\be or n
\bnu
\bum
\bmb
\bbe
\ber
\br is specified, the t
\bta
\bag
\bgp
\bpo
\bop
\bp
4313 command pops to the most recent entry in the tags
4314 stack for that file, or numbered entry in the tags
4315 stack, respectively. (See the d
\bdi
\bis
\bsp
\bpl
\bla
\bay
\by command for
4316 information on displaying the tags stack.)
4318 If the file has been modified since the last com-
4319 plete write, the t
\bta
\bag
\bgp
\bpo
\bop
\bp command will fail. This
4320 check may be overridden by appending a "!
\b!" char-
4321 acter to the command name.
4323 Line: Set to the line indicated by the tag.
4324 Options: Affected by the a
\bau
\but
\bto
\bow
\bwr
\bri
\bit
\bte
\be, and w
\bwr
\bri
\bit
\bte
\bea
\ban
\bny
\by
4327 t
\bta
\bag
\bgt
\bt[
\b[o
\bop
\bp]
\b][
\b[!
\b!]
\b]
4328 Pop to the least recent tag on the tags stack,
4329 clearing the tags stack.
4331 If the file has been modified since the last com-
4332 plete write, the t
\bta
\bag
\bgp
\bpo
\bop
\bp command will fail. This
4333 check may be overridden by appending a "!
\b!" char-
4334 acter to the command name.
4336 Line: Set to the line indicated by the tag.
4337 Options: Affected by the a
\bau
\but
\bto
\bow
\bwr
\bri
\bit
\bte
\be, and w
\bwr
\bri
\bit
\bte
\bea
\ban
\bny
\by
4340 u
\bun
\bna
\ba[
\b[b
\bbb
\bbr
\bre
\bev
\bv]
\b] l
\blh
\bhs
\bs
4341 Delete an abbreviation. Delete l
\blh
\bhs
\bs from the cur-
4342 rent list of abbreviations.
4347 u
\bu[
\b[n
\bnd
\bdo
\bo]
\b]
4348 Undo the last change made to the file. Changes
4349 made by g
\bgl
\blo
\bob
\bba
\bal
\bl, v
\bv, v
\bvi
\bis
\bsu
\bua
\bal
\bl and map sequences are
4350 considered a single command. If repeated, the u
\bu
4361 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(E
\bEx
\bx C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b) U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-6
\b67
\b7
4364 command alternates between these two states, and
4367 Line: Set to the last line modified by the com-
4371 u
\bun
\bnm
\bm[
\b[a
\bap
\bp]
\b][
\b[!
\b!]
\b] l
\blh
\bhs
\bs
4372 Unmap a mapped string. Delete the command mode
4373 map definition for l
\blh
\bhs
\bs. If a "!
\b!" character is
4374 appended to the command name, delete the text
4375 input mode map definition instead.
4380 v
\bve
\be[
\b[r
\brs
\bsi
\bio
\bon
\bn]
\b]
4381 Display the version of the e
\bex
\bx/
\b/v
\bvi
\bi editor.
4383 [
\b[l
\bli
\bin
\bne
\be]
\b] v
\bvi
\bi[
\b[s
\bsu
\bua
\bal
\bl]
\b] [
\b[t
\bty
\byp
\bpe
\be]
\b] [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] [
\b[f
\bfl
\bla
\bag
\bgs
\bs]
\b]
4384 E
\bEx
\bx mode only. Enter v
\bvi
\bi. The t
\bty
\byp
\bpe
\be is optional,
4385 and can be "-
\b-", "+
\b+" or "^
\b^", as in the e
\bex
\bx z
\bz com-
4386 mand, to specify the the position of the specified
4387 line in the screen window. (The default is to
4388 place the line at the top of the screen window.)
4389 A c
\bco
\bou
\bun
\bnt
\bt specifies the number of lines that will
4390 initially be displayed. (The default is the value
4391 of the w
\bwi
\bin
\bnd
\bdo
\bow
\bw editor option.)
4393 Line: Unchanged unless l
\bli
\bin
\bne
\be is specified, in
4394 which case it is set to that line.
4397 v
\bvi
\bi[
\b[s
\bsu
\bua
\bal
\bl]
\b][
\b[!
\b!]
\b] [
\b[+
\b+c
\bcm
\bmd
\bd]
\b] [
\b[f
\bfi
\bil
\ble
\be]
\b]
4398 V
\bVi
\bi mode only. Edit a new file. Identical to the
4399 "e
\bed
\bdi
\bit
\bt[
\b[!
\b!]
\b] [
\b[+
\b+c
\bcm
\bmd
\bd]
\b] [
\b[f
\bfi
\bil
\ble
\be]
\b]" command.
4401 v
\bvi
\biu
\bu[
\b[s
\bsa
\bag
\bge
\be]
\b] [
\b[c
\bco
\bom
\bmm
\bma
\ban
\bnd
\bd]
\b]
4402 Display usage for a v
\bvi
\bi command. If c
\bco
\bom
\bmm
\bma
\ban
\bnd
\bd is
4403 specified, a usage statement for that command is
4404 displayed. Otherwise, usage statements for all v
\bvi
\bi
4405 commands are displayed.
4410 [
\b[r
\bra
\ban
\bng
\bge
\be]
\b] w
\bw[
\b[r
\bri
\bit
\bte
\be]
\b][
\b[!
\b!]
\b] [
\b[>
\b>>
\b>]
\b] [
\b[f
\bfi
\bil
\ble
\be]
\b]
4411 [
\b[r
\bra
\ban
\bng
\bge
\be]
\b] w
\bw[
\b[r
\bri
\bit
\bte
\be]
\b] [
\b[!
\b!]
\b] [
\b[f
\bfi
\bil
\ble
\be]
\b]
4412 [
\b[r
\bra
\ban
\bng
\bge
\be]
\b] w
\bwn
\bn[
\b[!
\b!]
\b] [
\b[>
\b>>
\b>]
\b] [
\b[f
\bfi
\bil
\ble
\be]
\b]
4413 [
\b[r
\bra
\ban
\bng
\bge
\be]
\b] w
\bwq
\bq[
\b[!
\b!]
\b] [
\b[>
\b>>
\b>]
\b] [
\b[f
\bfi
\bil
\ble
\be]
\b]
4414 Write the file. The specified lines (the entire
4415 file, if no range is given) is written to f
\bfi
\bil
\ble
\be.
4416 If f
\bfi
\bil
\ble
\be is not specified, the current pathname is
4427 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-6
\b68
\b8 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(E
\bEx
\bx C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b)
4430 used. If f
\bfi
\bil
\ble
\be is specified, and it exists, or if
4431 the current pathname was set using the f
\bfi
\bil
\ble
\be com-
4432 mand, and the file already exists, these commands
4433 will fail. Appending a "!
\b!" character to the com-
4434 mand name will override this check and the write
4435 will be attempted, regardless.
4437 Specifying the optional ">
\b>>
\b>" string will cause the
4438 write to be appended to the file, in which case no
4439 tests are made for the file already existing.
4441 If the file is preceded by a "!
\b!" character, the
4442 program named in the SHELL environment variable is
4443 invoked with file as its second argument, and the
4444 specified lines are passed as standard input to
4445 that command. The "!
\b!" in this usage must be sep-
4446 arated from command name by at least one whites-
4447 pace character. The special meaning of the "!
\b!"
4448 may be overridden by escaping it with a backslash
4451 The w
\bwq
\bq version of the write command will exit the
4452 editor after writing the file, if there are no
4453 further files to edit. Appending a "!
\b!" character
4454 to the command name or entering two "quit" com-
4455 mands (i.e. w
\bwq
\bq, q
\bqu
\bui
\bit
\bt, x
\bxi
\bit
\bt or Z
\bZZ
\bZ) in a row) will
4456 override this check and the editor will exit,
4457 ignoring any files that have not yet been edited.
4459 The w
\bwn
\bn version of the write command will move to
4460 the next file after writing the file, unless the
4464 Options: Affected by the r
\bre
\bea
\bad
\bdo
\bon
\bnl
\bly
\by and w
\bwr
\bri
\bit
\bte
\bea
\ban
\bny
\by
4467 [
\b[r
\bra
\ban
\bng
\bge
\be]
\b] x
\bx[
\b[i
\bit
\bt]
\b][
\b[!
\b!]
\b] [
\b[f
\bfi
\bil
\ble
\be]
\b]
4468 Write the file if it has been modified. The spec-
4469 ified lines are written to f
\bfi
\bil
\ble
\be, if the file has
4470 been modified since the last complete write to any
4471 file. If no r
\bra
\ban
\bng
\bge
\be is specified, the entire file
4474 The x
\bxi
\bit
\bt command will exit the editor after writing
4475 the file, if there are no further files to edit.
4476 Appending a "!
\b!" character to the command name or
4477 entering two "quit" commands (i.e. w
\bwq
\bq, q
\bqu
\bui
\bit
\bt, x
\bxi
\bit
\bt
4478 or Z
\bZZ
\bZ) in a row) will override this check and the
4479 editor will exit, ignoring any files that have not
4493 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be (
\b(E
\bEx
\bx C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs)
\b) U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-6
\b69
\b9
4497 Options: Affected by the r
\bre
\bea
\bad
\bdo
\bon
\bnl
\bly
\by and w
\bwr
\bri
\bit
\bte
\bea
\ban
\bny
\by
4500 [
\b[r
\bra
\ban
\bng
\bge
\be]
\b] y
\bya
\ba[
\b[n
\bnk
\bk]
\b] [
\b[b
\bbu
\buf
\bff
\bfe
\ber
\br]
\b] [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b]
4501 Copy the specified lines to a buffer. If no
4502 buffer is specified, the unnamed buffer is used.
4507 [
\b[l
\bli
\bin
\bne
\be]
\b] z
\bz [
\b[t
\bty
\byp
\bpe
\be]
\b] [
\b[c
\bco
\bou
\bun
\bnt
\bt]
\b] [
\b[f
\bfl
\bla
\bag
\bgs
\bs]
\b]
4508 Adjust the window. If no t
\bty
\byp
\bpe
\be is specified, then
4509 c
\bco
\bou
\bun
\bnt
\bt lines following the specified line are dis-
4510 played. The default c
\bco
\bou
\bun
\bnt
\bt is the value of the
4511 w
\bwi
\bin
\bnd
\bdo
\bow
\bw option. The t
\bty
\byp
\bpe
\be argument changes the
4512 position at which l
\bli
\bin
\bne
\be is displayed on the screen
4513 by changing the number of lines displayed before
4514 and after l
\bli
\bin
\bne
\be. The following t
\bty
\byp
\bpe
\be characters may
4517 - Place the line at the bottom of the
4519 + Place the line at the top of the screen.
4520 . Place the line in the middle of the
4522 ^ Write out count lines starting c
\bco
\bou
\bun
\bnt
\bt *
\b* 2
\b2
4523 lines before l
\bli
\bin
\bne
\be; the net effect of this
4524 is that a "z
\bz^
\b^" command following a z
\bz com-
4525 mand writes the previous page.
4526 = Center l
\bli
\bin
\bne
\be on the screen with a line of
4527 hyphens displayed immediately before and
4528 after it. The number of preceding and
4529 following lines of text displayed are
4530 reduced to account for those lines.
4532 Line: Set to the last line displayed, with the
4533 exception of the t
\bty
\byp
\bpe
\be, where the current
4534 line is set to the line specified by the
4536 Options: Affected by the option.
4538 1
\b15
\b5.
\b. S
\bSe
\bet
\bt O
\bOp
\bpt
\bti
\bio
\bon
\bns
\bs
4540 There are a large number of options that may be
4541 set (or unset) to change the editor's behavior. This
4542 section describes the options, their abbreviations and
4543 their default values.
4545 In each entry below, the first part of the tag
4546 line is the full name of the option, followed by any
4547 equivalent abbreviations. (Regardless of the abbrevia-
4548 tions, it is only necessary to use the minimum number
4559 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-7
\b70
\b0 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be
4562 of characters necessary to distinguish an abbreviation
4563 from all other commands for it to be accepted, in
4564 n
\bne
\bex
\bx/n
\bnv
\bvi
\bi. Historically, only the full name and the
4565 official abbreviations were accepted by e
\bex
\bx/v
\bvi
\bi. Using
4566 full names in your startup files and environmental
4567 variables will probably make them more portable.) The
4568 part in square brackets is the default value of the
4569 option. Most of the options are boolean, i.e. they are
4570 either on or off, and do not have an associated value.
4572 Options apply to both e
\bex
\bx and v
\bvi
\bi modes, unless oth-
4575 For information on modifying the options or to
4576 display the options and their current values, see the
4577 "set" command in the section entitled "E
\bEx
\bx C
\bCo
\bom
\bmm
\bma
\ban
\bnd
\bds
\bs".
4579 a
\bal
\blt
\btw
\bwe
\ber
\bra
\bas
\bse
\be [
\b[o
\bof
\bff
\bf]
\b]
4580 V
\bVi
\bi only. Change how v
\bvi
\bi does word erase during
4581 text input. When this option is set, text is bro-
4582 ken up into three classes: alphabetic, numeric and
4583 underscore characters, other nonblank characters,
4584 and blank characters. Changing from one class to
4585 another marks the end of a word. In addition, the
4586 class of the first character erased is ignored
4587 (which is exactly what you want when erasing path-
4590 a
\bau
\but
\bto
\boi
\bin
\bnd
\bde
\ben
\bnt
\bt,
\b, a
\bai
\bi [
\b[o
\bof
\bff
\bf]
\b]
4591 If this option is set, whenever you create a new
4592 line (using the v
\bvi
\bi A
\bA, a
\ba, C
\bC, c
\bc, I
\bI, i
\bi, O
\bO, o
\bo, R
\bR, r
\br,
4593 S
\bS, and s
\bs commands, or the e
\bex
\bx a
\bap
\bpp
\bpe
\ben
\bnd
\bd, c
\bch
\bha
\ban
\bng
\bge
\be, and
4594 i
\bin
\bns
\bse
\ber
\brt
\bt commands) the new line is automatically
4595 indented to align the cursor with the first non-
4596 blank character of the line from which you created
4597 it. Lines are indented using tab characters to
4598 the extent possible (based on the value of the
4599 t
\bta
\bab
\bbs
\bst
\bto
\bop
\bp option) and then using space characters as
4600 necessary. For commands inserting text into the
4601 middle of a line, any blank characters to the
4602 right of the cursor are discarded, and the first
4603 nonblank character to the right of the cursor is
4604 aligned as described above.
4606 The indent characters are themselves somewhat spe-
4607 cial. If you do not enter more characters on the
4608 new line before moving to another line, or enter-
4609 ing <
\b<e
\bes
\bsc
\bca
\bap
\bpe
\be>
\b>, the indent character will be deleted
4610 and the line will be empty. For example, if you
4611 enter <
\b<c
\bca
\bar
\brr
\bri
\bia
\bag
\bge
\be-
\b-r
\bre
\bet
\btu
\bur
\brn
\bn>
\b> twice in succession, the
4612 line created by the first <
\b<c
\bca
\bar
\brr
\bri
\bia
\bag
\bge
\be-
\b-r
\bre
\bet
\btu
\bur
\brn
\bn>
\b> will
4613 not have any characters in it, regardless of the
4614 indentation of the previous or subsequent line.
4625 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-7
\b71
\b1
4628 Indent characters also require that you enter
4629 additional erase characters to delete them. For
4630 example, if you have an indented line, containing
4631 only blanks, the first <
\b<w
\bwo
\bor
\brd
\bd-
\b-e
\ber
\bra
\bas
\bse
\be>
\b> character you
4632 enter will erase up to end of the indent charac-
4633 ters, and the second will erase back to the begin-
4634 ning of the line. (Historically, only the <
\b<c
\bco
\bon
\bn-
\b-
4635 t
\btr
\bro
\bol
\bl-
\b-D
\bD>
\b> key would erase the indent characters.
4636 Both the <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-D
\bD>
\b> key and the usual erase keys
4637 work in n
\bnv
\bvi
\bi.) In addition, if the cursor is posi-
4638 tioned at the end of the indent characters, the
4639 keys "0
\b0<
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-D
\bD>
\b>" will erase all of the indent
4640 characters for the current line, resetting the
4641 indentation level to 0. Similarly, the keys
4642 "^
\b^<
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-D
\bD>
\b>" will erase all of the indent char-
4643 acters for the current line, leaving the indenta-
4644 tion level for future created lines unaffected.
4646 Finally, if the a
\bau
\but
\bto
\boi
\bin
\bnd
\bde
\ben
\bnt
\bt option is set, the S
\bS
4647 and c
\bcc
\bc commands change from the first nonblank of
4648 the line to the end of the line, instead of from
4649 the beginning of the line to the end of the line.
4651 a
\bau
\but
\bto
\bop
\bpr
\bri
\bin
\bnt
\bt,
\b, a
\bap
\bp [
\b[o
\bof
\bff
\bf]
\b]
4652 E
\bEx
\bx only. Cause the current line to be automati-
4653 cally displayed after the e
\bex
\bx commands <
\b<, >
\b>, c
\bco
\bop
\bpy
\by,
4654 d
\bde
\bel
\ble
\bet
\bte
\be, j
\bjo
\boi
\bin
\bn, m
\bmo
\bov
\bve
\be, p
\bpu
\but
\bt, t
\bt, U
\bUn
\bnd
\bdo
\bo, and u
\bun
\bnd
\bdo
\bo. This
4655 automatic display is suppressed during g
\bgl
\blo
\bob
\bba
\bal
\bl and
4656 v
\bvg
\bgl
\blo
\bob
\bba
\bal
\bl commands, and for any command where
4657 optional flags are used to explicitly display the
4660 a
\bau
\but
\bto
\bow
\bwr
\bri
\bit
\bte
\be,
\b, a
\baw
\bw [
\b[o
\bof
\bff
\bf]
\b]
4661 If this option is set, the v
\bvi
\bi !
\b!, ^
\b^^
\b^, ^
\b^]
\b] and <
\b<c
\bco
\bon
\bn-
\b-
4662 t
\btr
\bro
\bol
\bl-
\b-Z
\bZ>
\b> commands, and the e
\bex
\bx e
\bed
\bdi
\bit
\bt, n
\bne
\bex
\bxt
\bt, r
\bre
\bew
\bwi
\bin
\bnd
\bd,
4663 s
\bst
\bto
\bop
\bp, s
\bsu
\bus
\bsp
\bpe
\ben
\bnd
\bd, t
\bta
\bag
\bg, t
\bta
\bag
\bgp
\bpo
\bop
\bp, and t
\bta
\bag
\bgt
\bto
\bop
\bp commands
4664 automatically write the current file back to the
4665 current file name if it has been modified since it
4666 was last written. If the write fails, the command
4667 fails and goes no further.
4669 Appending the optional force flag character "!
\b!"
4670 to the e
\bex
\bx commands n
\bne
\bex
\bxt
\bt, r
\bre
\bew
\bwi
\bin
\bnd
\bd, s
\bst
\bto
\bop
\bp, s
\bsu
\bus
\bsp
\bpe
\ben
\bnd
\bd,
4671 t
\bta
\bag
\bg, t
\bta
\bag
\bgp
\bpo
\bop
\bp, and t
\bta
\bag
\bgt
\bto
\bop
\bp stops the automatic write
4672 from being attempted.
4674 (Historically, the n
\bne
\bex
\bxt
\bt command ignored the
4675 optional force flag.) Note, the e
\bex
\bx commands e
\bed
\bdi
\bit
\bt,
4676 q
\bqu
\bui
\bit
\bt, s
\bsh
\bhe
\bel
\bll
\bl, and x
\bxi
\bit
\bt are _
\bn_
\bo_
\bt affected by the
4677 a
\bau
\but
\bto
\bow
\bwr
\bri
\bit
\bte
\be option.
4679 b
\bbe
\bea
\bau
\but
\bti
\bif
\bfy
\by,
\b, b
\bbf
\bf [
\b[o
\bof
\bff
\bf]
\b]
4680 If this option is set, all control characters that
4691 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-7
\b72
\b2 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be
4694 are not currently being specially interpreted,
4695 other than <
\b<t
\bta
\bab
\bb>
\b>, <
\b<n
\bne
\bew
\bwl
\bli
\bin
\bne
\be>
\b>, and <
\b<f
\bfo
\bor
\brm
\bm-
\b-f
\bfe
\bee
\bed
\bd>
\b>, are
4696 discarded from commands read in by e
\bex
\bx from command
4697 files, and from input text entered to v
\bvi
\bi (either
4698 into the file or to the colon command line). Text
4699 files read by e
\bex
\bx/v
\bvi
\bi are _
\bn_
\bo_
\bt affected by the b
\bbe
\bea
\bau
\bu-
\b-
4700 t
\bti
\bif
\bfy
\by option.
4702 c
\bcd
\bdp
\bpa
\bat
\bth
\bh [
\b[e
\ben
\bnv
\bvi
\bir
\bro
\bon
\bnm
\bme
\ben
\bnt
\bt v
\bva
\bar
\bri
\bia
\bab
\bbl
\ble
\be C
\bCD
\bDP
\bPA
\bAT
\bTH
\bH,
\b, o
\bor
\br c
\bcu
\bur
\brr
\bre
\ben
\bnt
\bt d
\bdi
\bir
\bre
\bec
\bc-
\b-
4703 t
\bto
\bor
\bry
\by]
\b]
4704 This option is used to specify a colon separated
4705 list of directories which are used as path pre-
4706 fixes for any relative path names used as argu-
4707 ments for the c
\bcd
\bd command. The value of this
4708 option defaults to the value of the environmental
4709 variable C
\bCD
\bDP
\bPA
\bAT
\bTH
\bH if it is set, otherwise to the
4710 current directory. For compatibility with the
4711 POSIX 1003.2 shell, the c
\bcd
\bd command does _
\bn_
\bo_
\bt check
4712 the current directory as a path prefix for rela-
4713 tive path names unless it is explicitly specified.
4714 It may be so specified by entering an empty string
4715 or a ".
\b." character into the C
\bCD
\bDP
\bPA
\bAT
\bTH
\bH variable or
4718 c
\bco
\bol
\blu
\bum
\bmn
\bns
\bs,
\b, c
\bco
\bo [
\b[8
\b80
\b0]
\b]
4719 The number of columns in the screen. Setting this
4720 option causes e
\bex
\bx/v
\bvi
\bi to set (or reset) the environ-
4721 mental variable C
\bCO
\bOL
\bLU
\bUM
\bMN
\bNS
\bS. See the section entitled
4722 "S
\bSi
\biz
\bzi
\bin
\bng
\bg t
\bth
\bhe
\be S
\bSc
\bcr
\bre
\bee
\ben
\bn" more information.
4724 c
\bco
\bom
\bmm
\bme
\ben
\bnt
\bt [
\b[o
\bof
\bff
\bf]
\b]
4725 V
\bVi
\bi only. If the first non-empty line of the file
4726 begins with the string "/
\b/*
\b*", this option causes v
\bvi
\bi
4727 to skip to the end of that C-language comment
4728 (probably a terribly boring legal notice) before
4729 displaying the file.
4731 d
\bdi
\bir
\bre
\bec
\bct
\bto
\bor
\bry
\by,
\b, d
\bdi
\bir
\br [
\b[e
\ben
\bnv
\bvi
\bir
\bro
\bon
\bnm
\bme
\ben
\bnt
\bt v
\bva
\bar
\bri
\bia
\bab
\bbl
\ble
\be T
\bTM
\bMP
\bPD
\bDI
\bIR
\bR,
\b, o
\bor
\br /
\b/t
\btm
\bmp
\bp]
\b]
4732 The directory where temporary files are created.
4733 The environmental variable T
\bTM
\bMP
\bPD
\bDI
\bIR
\bR is used as the
4734 default value if it exists, otherwise /
\b/t
\btm
\bmp
\bp is
4737 e
\bed
\bdc
\bco
\bom
\bmp
\bpa
\bat
\bti
\bib
\bbl
\ble
\be,
\b, e
\bed
\bd [
\b[o
\bof
\bff
\bf]
\b]
4738 Remember the values of the "c" and "g" suffices to
4739 the s
\bsu
\bub
\bbs
\bst
\bti
\bit
\btu
\but
\bte
\be commands, instead of initializing
4740 them as unset for each new command. Specifying
4741 pattern and replacement strings to the s
\bsu
\bub
\bbs
\bst
\bti
\bit
\btu
\but
\bte
\be
4742 command unsets the "c" and "g" suffices as well.
4744 e
\ber
\brr
\bro
\bor
\brb
\bbe
\bel
\bll
\bls
\bs,
\b, e
\beb
\bb [
\b[o
\bof
\bff
\bf]
\b]
4745 E
\bEx
\bx only. E
\bEx
\bx error messages are normally presented
4746 in inverse video. If that is not possible for the
4757 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-7
\b73
\b3
4760 terminal, setting this option causes error mes-
4761 sages to be announced by ringing the terminal
4764 e
\bex
\bxr
\brc
\bc,
\b, e
\bex
\bx [
\b[o
\bof
\bff
\bf]
\b]
4765 If this option is turned off in the system or
4766 $HOME startup files, the local startup files are
4767 never read (unless they are the same as the system
4768 or $HOME startup files). Turning it on has no
4769 effect, i.e. the normal checks for local startup
4770 files are performed, regardless. See the section
4771 entitled "S
\bSt
\bta
\bar
\brt
\btu
\bup
\bp I
\bIn
\bnf
\bfo
\bor
\brm
\bma
\bat
\bti
\bio
\bon
\bn" for more informa-
4774 e
\bex
\bxt
\bte
\ben
\bnd
\bde
\bed
\bd [
\b[o
\bof
\bff
\bf]
\b]
4775 This option causes all regular expressions to be
4776 treated as POSIX 1003.2 Extended Regular Expres-
4777 sions (which are similar to historic _
\be_
\bg_
\br_
\be_
\bp(1)
4780 f
\bfl
\bla
\bas
\bsh
\bh [
\b[o
\bon
\bn]
\b]
4781 This option causes the screen to flash instead of
4782 beeping the keyboard, on error, if the terminal
4785 h
\bha
\bar
\brd
\bdt
\bta
\bab
\bbs
\bs,
\b, h
\bht
\bt [
\b[8
\b8]
\b]
4786 This option defines the spacing between hardware
4787 tab settings, i.e. the tab expansion done by the
4788 operating system and/or the terminal itself. As
4789 n
\bne
\bex
\bx/n
\bnv
\bvi
\bi never writes <
\b<t
\bta
\bab
\bb>
\b> characters to the ter-
4790 minal, unlike historic versions of e
\bex
\bx/v
\bvi
\bi, this
4791 option does not currently have any affect.
4793 i
\big
\bgn
\bno
\bor
\bre
\bec
\bca
\bas
\bse
\be,
\b, i
\bic
\bc [
\b[o
\bof
\bff
\bf]
\b]
4794 This option causes regular expressions, both in e
\bex
\bx
4795 commands and in searches, to be evaluated in a
4796 case-insensitive manner.
4798 k
\bke
\bey
\byt
\bti
\bim
\bme
\be [
\b[6
\b6]
\b]
4799 The 10th's of a second e
\bex
\bx/v
\bvi
\bi waits for a subse-
4800 quent key to complete a key mapping.
4802 l
\ble
\bef
\bft
\btr
\bri
\big
\bgh
\bht
\bt [
\b[o
\bof
\bff
\bf]
\b]
4803 V
\bVi
\bi only. This option causes the screen to be
4804 scrolled left-right to view lines longer than the
4805 screen, instead of the traditional v
\bvi
\bi screen
4806 interface which folds long lines at the right-hand
4807 margin of the terminal.
4809 l
\bli
\bin
\bne
\bes
\bs,
\b, l
\bli
\bi [
\b[2
\b24
\b4]
\b]
4810 V
\bVi
\bi only. The number of lines in the screen. Set-
4811 ting this option causes e
\bex
\bx/v
\bvi
\bi to set (or reset)
4812 the environmental variable L
\bLI
\bIN
\bNE
\bES
\bS. See the section
4823 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-7
\b74
\b4 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be
4826 entitled "S
\bSi
\biz
\bzi
\bin
\bng
\bg t
\bth
\bhe
\be S
\bSc
\bcr
\bre
\bee
\ben
\bn" for more information.
4828 l
\bli
\bis
\bsp
\bp [
\b[o
\bof
\bff
\bf]
\b]
4829 V
\bVi
\bi only. This option changes the behavior of the
4830 v
\bvi
\bi (
\b(, )
\b), {
\b{, }
\b}, [
\b[[
\b[ and ]
\b]]
\b] commands to match the
4831 Lisp language. Also, the a
\bau
\but
\bto
\boi
\bin
\bnd
\bde
\ben
\bnt
\bt option's
4832 behavior is changed to be appropriate for Lisp.
4834 _
\bT_
\bh_
\bi_
\bs _
\bo_
\bp_
\bt_
\bi_
\bo_
\bn _
\bi_
\bs _
\bn_
\bo_
\bt _
\by_
\be_
\bt _
\bi_
\bm_
\bp_
\bl_
\be_
\bm_
\be_
\bn_
\bt_
\be_
\bd_
\b.
4836 l
\bli
\bis
\bst
\bt [
\b[o
\bof
\bff
\bf]
\b]
4837 This option causes lines to be displayed in an
4838 unambiguous fashion. Specifically, tabs are dis-
4839 played as control characters, i.e. "^
\b^I
\bI", and the
4840 ends of lines are marked with a "$
\b$" character.
4842 m
\bma
\bag
\bgi
\bic
\bc [
\b[o
\bon
\bn]
\b]
4843 This option is on by default. Turning the m
\bma
\bag
\bgi
\bic
\bc
4844 option off causes all regular expression charac-
4845 ters except for "^
\b^" and "$
\b$", to be treated as
4846 ordinary characters. To re-enable characters
4847 individually, when the m
\bma
\bag
\bgi
\bic
\bc option is off, pre-
4848 cede them with a backslash "\
\b\" character. See the
4849 section entitled "R
\bRe
\beg
\bgu
\bul
\bla
\bar
\br E
\bEx
\bxp
\bpr
\bre
\bes
\bss
\bsi
\bio
\bon
\bns
\bs a
\ban
\bnd
\bd R
\bRe
\bep
\bpl
\bla
\bac
\bce
\be-
\b-
4850 m
\bme
\ben
\bnt
\bt S
\bSt
\btr
\bri
\bin
\bng
\bgs
\bs" for more information.
4852 m
\bma
\bat
\btc
\bch
\bht
\bti
\bim
\bme
\be [
\b[7
\b7]
\b]
4853 V
\bVi
\bi only. The 10th's of a second e
\bex
\bx/v
\bvi
\bi pauses on
4854 the matching character when the s
\bsh
\bho
\bow
\bwm
\bma
\bat
\btc
\bch
\bh option
4857 m
\bme
\bes
\bsg
\bg [
\b[o
\bon
\bn]
\b]
4858 This option allows other users to contact you
4859 using the _
\bt_
\ba_
\bl_
\bk(1) and _
\bw_
\br_
\bi_
\bt_
\be(1) utilities, while
4860 you are editing. E
\bEx
\bx/v
\bvi
\bi does not turn message on,
4861 i.e. if messages were turned off when the editor
4862 was invoked, they will stay turned off. This
4863 option only permits you to disallow messages for
4864 the edit session. See the _
\bm_
\be_
\bs_
\bg(1) utility for
4867 m
\bmo
\bod
\bde
\bel
\bli
\bin
\bne
\bes
\bs,
\b, m
\bmo
\bod
\bde
\bel
\bli
\bin
\bne
\be [
\b[o
\bof
\bff
\bf]
\b]
4868 If the m
\bmo
\bod
\bde
\bel
\bli
\bin
\bne
\bes
\bs option is set, e
\bex
\bx/v
\bvi
\bi has histori-
4869 cally scanned the first and last five lines of
4870 each file as it is read for editing, looking for
4871 any e
\bex
\bx commands that have been placed in those
4872 lines. After the startup information has been
4873 processed, and before the user starts editing the
4874 file, any commands embedded in the file are exe-
4877 Commands were recognized by the letters "e" or "v"
4878 followed by "x" or "i", at the beginning of a line
4889 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-7
\b75
\b5
4892 or following a tab or space character, and fol-
4893 lowed by a ":", an e
\bex
\bx command, and another ":".
4895 This option is a security problem of immense pro-
4896 portions, and should not be used under any circum-
4899 _
\bT_
\bh_
\bi_
\bs _
\bo_
\bp_
\bt_
\bi_
\bo_
\bn _
\bw_
\bi_
\bl_
\bl _
\bn_
\be_
\bv_
\be_
\br _
\bb_
\be _
\bi_
\bm_
\bp_
\bl_
\be_
\bm_
\be_
\bn_
\bt_
\be_
\bd_
\b.
4901 n
\bnu
\bum
\bmb
\bbe
\ber
\br,
\b, n
\bnu
\bu [
\b[o
\bof
\bff
\bf]
\b]
4902 Precede each line displayed with its current line
4905 o
\boc
\bct
\bta
\bal
\bl [
\b[o
\bof
\bff
\bf]
\b]
4906 Display unknown characters as octal numbers,
4907 instead of the default hexadecimal.
4909 o
\bop
\bpe
\ben
\bn [
\b[o
\bon
\bn]
\b]
4910 E
\bEx
\bx only. If this option is not set, the o
\bop
\bpe
\ben
\bn and
4911 v
\bvi
\bis
\bsu
\bua
\bal
\bl commands are disallowed.
4913 o
\bop
\bpt
\bti
\bim
\bmi
\biz
\bze
\be,
\b, o
\bop
\bpt
\bt [
\b[o
\bon
\bn]
\b]
4914 V
\bVi
\bi only. Throughput of text is expedited by set-
4915 ting the terminal not to do automatic carriage
4916 returns when printing more than one (logical) line
4917 of output, greatly speeding output on terminals
4918 without addressable cursors when text with leading
4919 white space is printed.
4921 _
\bT_
\bh_
\bi_
\bs _
\bo_
\bp_
\bt_
\bi_
\bo_
\bn _
\bi_
\bs _
\bn_
\bo_
\bt _
\by_
\be_
\bt _
\bi_
\bm_
\bp_
\bl_
\be_
\bm_
\be_
\bn_
\bt_
\be_
\bd_
\b.
4923 p
\bpa
\bar
\bra
\bag
\bgr
\bra
\bap
\bph
\bhs
\bs,
\b, p
\bpa
\bar
\bra
\ba [
\b[I
\bIP
\bPL
\bLP
\bPP
\bPP
\bPQ
\bQP
\bPP
\bP L
\bLI
\bIp
\bpp
\bpl
\blp
\bpi
\bip
\bpb
\bbp
\bp]
\b]
4924 V
\bVi
\bi only. Define additional paragraph boundaries
4925 for the {
\b{ and }
\b} commands. The value of this
4926 option must be a character string consisting of
4927 zero or more character pairs.
4929 In the text to be edited, the character string
4930 <
\b<n
\bne
\bew
\bwl
\bli
\bin
\bne
\be>
\b>.
\b.<
\b<c
\bch
\bha
\bar
\br-
\b-p
\bpa
\bai
\bir
\br>
\b>, (where <
\b<c
\bch
\bha
\bar
\br-
\b-p
\bpa
\bai
\bir
\br>
\b> is one
4931 of the character pairs in the option's value)
4932 defines a paragraph boundary. For example, if the
4933 option were set to L
\bLa
\baA
\bA<
\b<s
\bsp
\bpa
\bac
\bce
\be>
\b>#
\b##
\b#, then all of the
4934 following additional paragraph boundaries would be
4943 p
\bpr
\bro
\bom
\bmp
\bpt
\bt [
\b[o
\bon
\bn]
\b]
4944 E
\bEx
\bx only. This option causes e
\bex
\bx to prompt for
4955 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-7
\b76
\b6 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be
4958 command input with a ":
\b:" character; when it is not
4959 set, no prompt is displayed.
4961 r
\bre
\bea
\bad
\bdo
\bon
\bnl
\bly
\by,
\b, r
\bro
\bo [
\b[o
\bof
\bff
\bf]
\b]
4962 This option causes a force flag to be required to
4963 attempt to write the file back to the original
4964 file name. Setting this option is equivalent to
4965 using the -
\b-R
\bR command line option, or editing a
4966 file which lacks write permission.
4968 r
\bre
\bec
\bcd
\bdi
\bir
\br [
\b[/
\b/v
\bva
\bar
\br/
\b/t
\btm
\bmp
\bp/
\b/v
\bvi
\bi.
\b.r
\bre
\bec
\bco
\bov
\bve
\ber
\br]
\b]
4969 The directory where recovery files are stored.
4971 If you change the value of r
\bre
\bec
\bcd
\bdi
\bir
\br, be careful to
4972 choose a directory whose contents are not regu-
4973 larly deleted. Bad choices include directories in
4974 memory based filesystems, or /
\b/t
\btm
\bmp
\bp, on most sys-
4975 tems, as their contents are removed when the
4976 machine is rebooted.
4978 Public directories like /
\b/u
\bus
\bsr
\br/
\b/t
\btm
\bmp
\bp and /
\b/v
\bva
\bar
\br/
\b/t
\btm
\bmp
\bp are
4979 usually safe, although some sites periodically
4980 prune old files from them. There is no require-
4981 ment that you use a public directory, e.g. a sub-
4982 directory of your home directory will work fine.
4984 Finally, if you change the value of r
\bre
\bec
\bcd
\bdi
\bir
\br, you
4985 must modify the recovery script to operate in your
4986 chosen recovery area.
4988 See the section entitled "R
\bRe
\bec
\bco
\bov
\bve
\ber
\bry
\by" for further
4991 r
\bre
\bed
\bdr
\bra
\baw
\bw,
\b, r
\bre
\be [
\b[o
\bof
\bff
\bf]
\b]
4992 V
\bVi
\bi only. The editor simulates (using great
4993 amounts of output), an intelligent terminal on a
4994 dumb terminal (e.g. during insertions in v
\bvi
\bi the
4995 characters to the right of the cursor are
4996 refreshed as each input character is typed).
4998 _
\bT_
\bh_
\bi_
\bs _
\bo_
\bp_
\bt_
\bi_
\bo_
\bn _
\bi_
\bs _
\bn_
\bo_
\bt _
\by_
\be_
\bt _
\bi_
\bm_
\bp_
\bl_
\be_
\bm_
\be_
\bn_
\bt_
\be_
\bd_
\b.
5000 r
\bre
\bem
\bma
\bap
\bp [
\b[o
\bon
\bn]
\b]
5001 If this option is set, it is possible to define
5002 macros in terms of other macros. Otherwise, each
5003 key is only remapped up to one time. For example,
5004 if "A
\bA" is mapped to "B
\bB", and "B
\bB" is mapped to "C
\bC",
5005 The keystroke "A
\bA" will be mapped to "C
\bC" if the
5006 r
\bre
\bem
\bma
\bap
\bp option is set, and to "B
\bB" if it is not set.
5008 r
\bre
\bep
\bpo
\bor
\brt
\bt [
\b[5
\b5]
\b]
5009 Set the threshold of the number of lines that need
5010 to be changed or yanked before a message will be
5021 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-7
\b77
\b7
5024 displayed to the user. For everything but the
5025 yank command, the value is the largest value about
5026 which the editor is silent, i.e. by default, 6
5027 lines must be deleted before the user is notified.
5028 However, if the number of lines yanked is greater
5029 than _
\bo_
\br _
\be_
\bq_
\bu_
\ba_
\bl _
\bt_
\bo the set value, it is reported to
5032 r
\bru
\bul
\ble
\ber
\br [
\b[o
\bof
\bff
\bf]
\b]
5033 V
\bVi
\bi only. Display a row/column ruler on the colon
5036 s
\bsc
\bcr
\bro
\bol
\bll
\bl,
\b, s
\bsc
\bcr
\br [
\b[w
\bwi
\bin
\bnd
\bdo
\bow
\bw /
\b/ 2
\b2]
\b]
5037 Set the number of lines scrolled by the v
\bvi
\bi <
\b<c
\bco
\bon
\bn-
\b-
5038 t
\btr
\bro
\bol
\bl-
\b-D
\bD>
\b> and <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-U
\bU>
\b> commands.
5040 Historically, the e
\bex
\bx z
\bz command, when specified
5041 without a count, used two times the size of the
5042 scroll value; the POSIX 1003.2 standard specified
5043 the window size, which is a better choice.
5045 s
\bse
\bec
\bct
\bti
\bio
\bon
\bns
\bs,
\b, s
\bse
\bec
\bct
\bt [
\b[N
\bNH
\bHS
\bSH
\bHH
\bH H
\bHU
\bUn
\bnh
\bhs
\bsh
\bh]
\b]
5046 V
\bVi
\bi only. Define additional section boundaries for
5047 the [
\b[[
\b[ and ]
\b]]
\b] commands. The s
\bse
\bec
\bct
\bti
\bio
\bon
\bns
\bs option
5048 should be set to a character string consisting of
5049 zero or more character pairs. In the text to be
5050 edited, the character string <
\b<n
\bne
\bew
\bwl
\bli
\bin
\bne
\be>
\b>.
\b.<
\b<c
\bch
\bha
\bar
\br-
\b-
5051 p
\bpa
\bai
\bir
\br>
\b>, (where <
\b<c
\bch
\bha
\bar
\br-
\b-p
\bpa
\bai
\bir
\br>
\b> is one of the character
5052 pairs in the option's value), defines a section
5053 boundary in the same manner that p
\bpa
\bar
\bra
\bag
\bgr
\bra
\bap
\bph
\bh option
5054 boundaries are defined.
5056 s
\bsh
\bhe
\bel
\bll
\bl,
\b, s
\bsh
\bh [
\b[e
\ben
\bnv
\bvi
\bir
\bro
\bon
\bnm
\bme
\ben
\bnt
\bt v
\bva
\bar
\bri
\bia
\bab
\bbl
\ble
\be S
\bSH
\bHE
\bEL
\bLL
\bL,
\b, o
\bor
\br /
\b/b
\bbi
\bin
\bn/
\b/s
\bsh
\bh]
\b]
5057 Select the shell used by the editor. The speci-
5058 fied path is the pathname of the shell invoked by
5059 the v
\bvi
\bi !
\b! shell escape command and by the e
\bex
\bx s
\bsh
\bhe
\bel
\bll
\bl
5060 command. This program is also used to resolve any
5061 shell meta-characters in e
\bex
\bx commands.
5063 s
\bsh
\bhi
\bif
\bft
\btw
\bwi
\bid
\bdt
\bth
\bh,
\b, s
\bsw
\bw [
\b[8
\b8]
\b]
5064 Set the autoindent and shift command indentation
5065 width. This width is used by the a
\bau
\but
\bto
\boi
\bin
\bnd
\bde
\ben
\bnt
\bt
5066 option and by the <
\b<, >
\b>, and s
\bsh
\bhi
\bif
\bft
\bt commands.
5068 s
\bsh
\bho
\bow
\bwd
\bdi
\bir
\brt
\bty
\by [
\b[o
\bof
\bff
\bf]
\b]
5069 V
\bVi
\bi only. Display an asterisk on the colon command
5070 line if the file has been modified.
5072 s
\bsh
\bho
\bow
\bwm
\bma
\bat
\btc
\bch
\bh,
\b, s
\bsm
\bm [
\b[o
\bof
\bff
\bf]
\b]
5073 V
\bVi
\bi only. This option causes v
\bvi
\bi, when a "}
\b}" or ")
\b)"
5074 is entered, to briefly move the cursor the match-
5075 ing "{
\b{" or "(
\b(". See the m
\bma
\bat
\btc
\bch
\bht
\bti
\bim
\bme
\be option for more
5087 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-7
\b78
\b8 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be
5090 s
\bsh
\bho
\bow
\bwm
\bmo
\bod
\bde
\be [
\b[o
\bof
\bff
\bf]
\b]
5091 V
\bVi
\bi only. This option causes v
\bvi
\bi to display a
5092 string identifying the current editor mode on the
5095 s
\bsi
\bid
\bde
\bes
\bsc
\bcr
\bro
\bol
\bll
\bl [
\b[1
\b16
\b6]
\b]
5096 V
\bVi
\bi only. Sets the number of columns that are
5097 shifted to the left or right, when v
\bvi
\bi is doing
5098 left-right scrolling and the left or right margin
5099 is crossed. See the l
\ble
\bef
\bft
\btr
\bri
\big
\bgh
\bht
\bt option for more
5102 s
\bsl
\blo
\bow
\bwo
\bop
\bpe
\ben
\bn,
\b, s
\bsl
\blo
\bow
\bw [
\b[o
\bof
\bff
\bf]
\b]
5103 This option affects the display algorithm used by
5104 v
\bvi
\bi, holding off display updating during input of
5105 new text to improve throughput when the terminal
5106 in use is slow and unintelligent.
5108 _
\bT_
\bh_
\bi_
\bs _
\bo_
\bp_
\bt_
\bi_
\bo_
\bn _
\bi_
\bs _
\bn_
\bo_
\bt _
\by_
\be_
\bt _
\bi_
\bm_
\bp_
\bl_
\be_
\bm_
\be_
\bn_
\bt_
\be_
\bd_
\b.
5110 s
\bso
\bou
\bur
\brc
\bce
\bea
\ban
\bny
\by [
\b[o
\bof
\bff
\bf]
\b]
5111 If this option is turned on, v
\bvi
\bi historically read
5112 startup files that were owned by someone other
5113 than the editor user. See the section entitled
5114 "S
\bSt
\bta
\bar
\brt
\btu
\bup
\bp I
\bIn
\bnf
\bfo
\bor
\brm
\bma
\bat
\bti
\bio
\bon
\bn" for more information. This
5115 option is a security problem of immense propor-
5116 tions, and should not be used under any circum-
5119 _
\bT_
\bh_
\bi_
\bs _
\bo_
\bp_
\bt_
\bi_
\bo_
\bn _
\bw_
\bi_
\bl_
\bl _
\bn_
\be_
\bv_
\be_
\br _
\bb_
\be _
\bi_
\bm_
\bp_
\bl_
\be_
\bm_
\be_
\bn_
\bt_
\be_
\bd_
\b.
5121 t
\bta
\bab
\bbs
\bst
\bto
\bop
\bp,
\b, t
\bts
\bs [
\b[8
\b8]
\b]
5122 This option sets tab widths for the editor dis-
5125 t
\bta
\bag
\bgl
\ble
\ben
\bng
\bgt
\bth
\bh,
\b, t
\btl
\bl [
\b[0
\b0]
\b]
5126 This option sets the maximum number of characters
5127 that are considered significant in a tag name.
5128 Setting the value to 0 makes all of the characters
5129 in the tag name significant.
5131 t
\bta
\bag
\bgs
\bs,
\b, t
\bta
\bag
\bg [
\b[t
\bta
\bag
\bgs
\bs /
\b/v
\bva
\bar
\br/
\b/d
\bdb
\bb/
\b/l
\bli
\bib
\bbc
\bc.
\b.t
\bta
\bag
\bgs
\bs /
\b/s
\bsy
\bys
\bs/
\b/k
\bke
\ber
\brn
\bn/
\b/t
\bta
\bag
\bgs
\bs]
\b]
5132 Sets the list of tags files, in search order,
5133 which are used when the editor searches for a tag.
5135 t
\bte
\ber
\brm
\bm,
\b, t
\btt
\bty
\byt
\bty
\byp
\bpe
\be,
\b, t
\btt
\bty
\by [
\b[e
\ben
\bnv
\bvi
\bir
\bro
\bon
\bnm
\bme
\ben
\bnt
\bt v
\bva
\bar
\bri
\bia
\bab
\bbl
\ble
\be T
\bTE
\bER
\bRM
\bM]
\b]
5136 Set the terminal type. Setting this option causes
5137 e
\bex
\bx/v
\bvi
\bi to set (or reset) the environmental variable
5140 t
\bte
\ber
\brs
\bse
\be [
\b[o
\bof
\bff
\bf]
\b]
5141 This option has historically made editor messages
5142 less verbose. It has no effect in this
5153 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-7
\b79
\b9
5156 implementation. See the v
\bve
\ber
\brb
\bbo
\bos
\bse
\be option for more
5159 t
\bti
\bil
\bld
\bde
\beo
\bop
\bp
5160 Modify the ~
\b~ command to take an associated motion.
5162 t
\bti
\bim
\bme
\beo
\bou
\but
\bt,
\b, t
\bto
\bo [
\b[o
\bon
\bn]
\b]
5163 If this option is set, e
\bex
\bx/v
\bvi
\bi waits for a specific
5164 period for a subsequent key to complete a key map-
5165 ping (see the k
\bke
\bey
\byt
\bti
\bim
\bme
\be option). If the option is
5166 not set, the editor waits until enough keys are
5167 entered to resolve the ambiguity, regardless of
5170 t
\btt
\bty
\byw
\bwe
\ber
\bra
\bas
\bse
\be [
\b[o
\bof
\bff
\bf]
\b]
5171 V
\bVi
\bi only. This option changes how v
\bvi
\bi does word
5172 erase during text input. If this option is set,
5173 text is broken up into two classes, blank charac-
5174 ters and nonblank characters. Changing from one
5175 class to another marks the end of a word.
5177 v
\bve
\ber
\brb
\bbo
\bos
\bse
\be [
\b[o
\bof
\bff
\bf]
\b]
5178 V
\bVi
\bi only. V
\bVi
\bi historically bells the terminal for
5179 many obvious mistakes, e.g. trying to move past
5180 the left-hand margin, or past the end of the file.
5181 If this option is set, an error message is dis-
5182 played for all errors.
5184 w
\bw3
\b30
\b00
\b0 [
\b[n
\bno
\bo d
\bde
\bef
\bfa
\bau
\bul
\blt
\bt]
\b]
5185 V
\bVi
\bi only. Set the window size if the baud rate is
5186 less than 1200 baud. See the w
\bwi
\bin
\bnd
\bdo
\bow
\bw option for
5189 w
\bw1
\b12
\b20
\b00
\b0 [
\b[n
\bno
\bo d
\bde
\bef
\bfa
\bau
\bul
\blt
\bt]
\b]
5190 V
\bVi
\bi only. Set the window size if the baud rate is
5191 equal to 1200 baud. See the w
\bwi
\bin
\bnd
\bdo
\bow
\bw option for
5194 w
\bw9
\b96
\b60
\b00
\b0 [
\b[n
\bno
\bo d
\bde
\bef
\bfa
\bau
\bul
\blt
\bt]
\b]
5195 V
\bVi
\bi only. Set the window size if the baud rate is
5196 greater than 1200 baud. See the w
\bwi
\bin
\bnd
\bdo
\bow
\bw option for
5199 w
\bwa
\bar
\brn
\bn [
\b[o
\bon
\bn]
\b]
5200 E
\bEx
\bx only. This option causes a warning message to
5201 the terminal if the file has been modified, since
5202 it was last written, before a !
\b! command.
5204 w
\bwi
\bin
\bnd
\bdo
\bow
\bw,
\b, w
\bw,
\b, w
\bwi
\bi [
\b[e
\ben
\bnv
\bvi
\bir
\bro
\bon
\bnm
\bme
\ben
\bnt
\bt v
\bva
\bar
\bri
\bia
\bab
\bbl
\ble
\be L
\bLI
\bIN
\bNE
\bES
\bS]
\b]
5205 This option determines the default number of lines
5206 in a screenful, as written by the z
\bz command. It
5207 also determines the number of lines scrolled by
5208 the v
\bvi
\bi commands <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-F
\bF>
\b> and <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-B
\bB>
\b>. The
5219 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-8
\b80
\b0 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be
5222 value of window can be unrelated to the real
5223 screen size, although it starts out as the number
5224 of lines on the screen (see the section entitled
5225 "S
\bSi
\biz
\bzi
\bin
\bng
\bg t
\bth
\bhe
\be S
\bSc
\bcr
\bre
\bee
\ben
\bn" for more information). Set-
5226 ting the value of the w
\bwi
\bin
\bnd
\bdo
\bow
\bw option is the same as
5227 using the -
\b-w
\bw command line option.
5229 If the value of the w
\bwi
\bin
\bnd
\bdo
\bow
\bw option (as set by the
5230 w
\bwi
\bin
\bnd
\bdo
\bow
\bw, w
\bw3
\b30
\b00
\b0, w
\bw1
\b12
\b20
\b00
\b0 or w
\bw9
\b96
\b60
\b00
\b0 options) is smaller
5231 than the actual size of the screen, large screen
5232 movements will result in displaying only that
5233 smaller number of lines on the screen. (Further
5234 movements in that same area will result in the
5235 screen being filled.) This can provide a perfor-
5236 mance improvement when viewing different places in
5237 one or more files over a slow link.
5239 w
\bwr
\bra
\bap
\bpm
\bma
\bar
\brg
\bgi
\bin
\bn,
\b, w
\bwm
\bm [
\b[0
\b0]
\b]
5240 V
\bVi
\bi only. If the value of the w
\bwr
\bra
\bap
\bpm
\bma
\bar
\brg
\bgi
\bin
\bn option is
5241 non-zero, v
\bvi
\bi will split lines so that they end at
5242 least that number of characters before the right-
5243 hand margin of the screen. (Note, the value of
5244 w
\bwr
\bra
\bap
\bpm
\bma
\bar
\brg
\bgi
\bin
\bn is _
\bn_
\bo_
\bt a text length. In a screen that
5245 is 80 columns wide, the command ":
\b:s
\bse
\bet
\bt w
\bwr
\bra
\bap
\bpm
\bma
\bar
\br-
\b-
5246 g
\bgi
\bin
\bn=
\b=8
\b8" attempts to keep the lines less than or
5247 equal to 72 columns wide.)
5249 Lines are split at the previous whitespace charac-
5250 ter closest to the number. Any trailing whites-
5251 pace characters before that character are deleted.
5252 If the line is split because of an inserted
5253 <
\b<s
\bsp
\bpa
\bac
\bce
\be>
\b> or <
\b<t
\bta
\bab
\bb>
\b> character, and you then enter
5254 another <
\b<s
\bsp
\bpa
\bac
\bce
\be>
\b> character, it is discarded.
5256 If wrapmargin is set to 0, or if there is no blank
5257 character upon which to split the line, the line
5260 w
\bwr
\bra
\bap
\bps
\bsc
\bca
\ban
\bn,
\b, w
\bws
\bs [
\b[o
\bon
\bn]
\b]
5261 This option causes searches to wrap around the end
5262 or the beginning of the file, and back to the
5263 starting point. Otherwise, the end or beginning
5264 of the file terminates the search.
5266 w
\bwr
\bri
\bit
\bte
\bea
\ban
\bny
\by,
\b, w
\bwa
\ba [
\b[o
\bof
\bff
\bf]
\b]
5267 If this option is set, file-overwriting checks
5268 that would usually be made before the w
\bwr
\bri
\bit
\bte
\be and
5269 x
\bxi
\bit
\bt commands, or before an automatic write (see
5270 the a
\bau
\but
\bto
\bow
\bwr
\bri
\bit
\bte
\be option), are not made. This allows
5271 a write to any file, provided the file permissions
5285 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-8
\b81
\b1
5288 1
\b16
\b6.
\b. A
\bAd
\bdd
\bdi
\bit
\bti
\bio
\bon
\bna
\bal
\bl F
\bFe
\bea
\bat
\btu
\bur
\bre
\bes
\bs i
\bin
\bn N
\bNe
\bex
\bx/
\b/N
\bNv
\bvi
\bi
5290 There are a few features in n
\bne
\bex
\bx/n
\bnv
\bvi
\bi that are not
5291 found in historic versions of e
\bex
\bx/v
\bvi
\bi. Some of the more
5292 interesting of those features are as follows:
5294 8
\b8-
\b-b
\bbi
\bit
\bt c
\bcl
\ble
\bea
\ban
\bn d
\bda
\bat
\bta
\ba,
\b, l
\bla
\bar
\brg
\bge
\be l
\bli
\bin
\bne
\bes
\bs,
\b, f
\bfi
\bil
\ble
\bes
\bs
5295 N
\bNe
\bex
\bx/n
\bnv
\bvi
\bi will edit any format file. Line lengths
5296 are limited by available memory, and file sizes
5297 are limited by available disk space. The v
\bvi
\bi text
5298 input mode command <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-X
\bX>
\b> can insert any pos-
5299 sible character value into the text.
5301 S
\bSp
\bpl
\bli
\bit
\bt s
\bsc
\bcr
\bre
\bee
\ben
\bns
\bs
5302 The s
\bsp
\bpl
\bli
\bit
\bt command divides the screen into multiple
5303 editing regions. The <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-W
\bW>
\b> command rotates
5304 between the foreground screens. The r
\bre
\bes
\bsi
\biz
\bze
\be com-
5305 mand can be used to grow or shrink a particular
5308 B
\bBa
\bac
\bck
\bkg
\bgr
\bro
\bou
\bun
\bnd
\bd a
\ban
\bnd
\bd f
\bfo
\bor
\bre
\beg
\bgr
\bro
\bou
\bun
\bnd
\bd s
\bsc
\bcr
\bre
\bee
\ben
\bns
\bs
5309 The b
\bbg
\bg command backgrounds the current screen, and
5310 the f
\bfg
\bg command foregrounds backgrounded screens.
5311 The d
\bdi
\bis
\bsp
\bpl
\bla
\bay
\by command can be used to list the back-
5314 T
\bTa
\bag
\bg s
\bst
\bta
\bac
\bck
\bks
\bs
5315 Tags are now maintained in a stack. The <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-
5316 T
\bT>
\b> command returns to the previous tag location.
5317 The t
\bta
\bag
\bgp
\bpo
\bop
\bp command returns to the most recent tag
5318 location by default, or, optionally to a specific
5319 tag number in the tag stack, or the most recent
5320 tag from a specified file. The d
\bdi
\bis
\bsp
\bpl
\bla
\bay
\by command
5321 can be used to list the tags stack. The t
\bta
\bag
\bgt
\bto
\bop
\bp
5322 command returns to the top of the tag stack.
5324 N
\bNe
\bew
\bw d
\bdi
\bis
\bsp
\bpl
\bla
\bay
\bys
\bs
5325 The d
\bdi
\bis
\bsp
\bpl
\bla
\bay
\by command can be used to display the
5326 current buffers, the backgrounded screens, and the
5329 I
\bIn
\bnf
\bfi
\bin
\bni
\bit
\bte
\be u
\bun
\bnd
\bdo
\bo
5330 Changes made during an edit session may be rolled
5331 backward and forward. A .
\b. command immediately
5332 after a u
\bu command continues either forward or
5333 backward depending on whether the u
\bu command was an
5336 U
\bUs
\bsa
\bag
\bge
\be i
\bin
\bnf
\bfo
\bor
\brm
\bma
\bat
\bti
\bio
\bon
\bn
5337 The e
\bex
\bxu
\bus
\bsa
\bag
\bge
\be and v
\bvi
\biu
\bus
\bsa
\bag
\bge
\be commands provide usage
5338 information for all of the e
\bex
\bx and v
\bvi
\bi commands by
5339 default, or, optionally, for a specific command or
5351 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-8
\b82
\b2 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be
5354 E
\bEx
\bxt
\bte
\ben
\bnd
\bde
\bed
\bd R
\bRe
\beg
\bgu
\bul
\bla
\bar
\br E
\bEx
\bxp
\bpr
\bre
\bes
\bss
\bsi
\bio
\bon
\bns
\bs
5355 The e
\bex
\bxt
\bte
\ben
\bnd
\bde
\bed
\bd option causes Regular Expressions to
5356 be interpreted as as Extended Regular Expressions,
5357 (i.e. _
\be_
\bg_
\br_
\be_
\bp(1) style Regular Expressions).
5359 W
\bWo
\bor
\brd
\bd s
\bse
\bea
\bar
\brc
\bch
\bh
5360 The <
\b<c
\bco
\bon
\bnt
\btr
\bro
\bol
\bl-
\b-A
\bA>
\b> command searches for the word ref-
5361 erenced by the cursor.
5363 N
\bNu
\bum
\bmb
\bbe
\ber
\br i
\bin
\bnc
\bcr
\bre
\bem
\bme
\ben
\bnt
\bt
5364 The #
\b# command increments or decrements the number
5365 referenced by the cursor.
5367 P
\bPr
\bre
\bev
\bvi
\bio
\bou
\bus
\bs f
\bfi
\bil
\ble
\be
5368 The p
\bpr
\bre
\bev
\bvi
\bio
\bou
\bus
\bs command edits the previous file from
5371 L
\bLe
\bef
\bft
\bt-
\b-r
\bri
\big
\bgh
\bht
\bt s
\bsc
\bcr
\bro
\bol
\bll
\bli
\bin
\bng
\bg
5372 The l
\ble
\bef
\bft
\btr
\bri
\big
\bgh
\bht
\bt option causes n
\bnv
\bvi
\bi to do left-right
5373 screen scrolling, instead of the traditional v
\bvi
\bi
5417 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-8
\b83
\b3
5420 1
\b17
\b7.
\b. I
\bIn
\bnd
\bde
\bex
\bx
5422 ! 16, 34 @ 20, 35 columns 47
5423 "" 34 A 20 comment 47
5424 # 16, 35 B 21 copy 37
5425 $ 16 C 21 count 10, 33
5426 % 17 D 21 current pathname 8
5429 ) 18 G 22 directory 48
5430 * 35 H 22 display 37
5432 , 18 J 22 edcompatible48
5433 /RE/ 19 L 22 edit 37
5434 0 19 M 23 errorbells 48
5435 0<control-D>31 N 19 exrc 48
5436 : 19 O 23 extended 48
5437 ; 20 P 23 exusage 38
5439 <control-A> 11 R 23 fg 38
5440 <control-B> 12 S 23 file 33, 38
5441 <control-
\b1D
\b2>
\b, 31 T 24 flags 33
5442 <control-E> 12 U 24 flash 48
5443 <control-F> 12 W 24 global 38
5444 <control-G> 13 X 24 hardtabs 48
5445 <control-
\b1H
\b3>
\b, 31 Y 24 help 38
5446 <control-J> 13 ZZ 24 i 27
5447 <control-L> 13 [[ 25 ignorecase 48
5448 <control-M> 13 - 18 insert 39
5449 <control-N> 13 ]] 25 j 13
5450 <control-P> 14 ^ 25 join 39
5451 <control-R> 13 ^<control-D>31 k 14, 40
5452 <control-
\b1T
\b4>
\b, 31 _ 25 keytime 48
5453 <control-U> 14 `<character>17 l 15
5454 <control-
\b1W
\b4>
\b, 32 a 25 leftright 48
5455 <control-X> 32 abbrev 36 line 33
5456 <control-Y> 14 alternate pathname 8 lines 48
5457 <control-
\b1Z
\b4>
\b, 43 altwerase 46 lisp 48
5458 <control-]> 15 append 36 list 39, 48
5459 <control-^> 15 args 36 m 27
5460 <end-of-file> 34 autoindent 46 magic 49
5461 <eof> 33 autoprint 47 map 39
5462 <erase> 31 autowrite 47 mark 40
5463 <escape>15, 31 b 26 matchtime 49
5464 <inter
\b8r
\b,up
\b3t
\b0>
\b, 32 beautify 47 mesg 49
5465 <line erase>31 bg 36 mkexrc 40
5466 <literal next> 8, 31 bigword 11 modelines 49
5467 <nul> 31 buffer 8 motion 10
5468 <space> 15 c 26 move 40
5469 <word erase>32 cd 36 n 19
5470 = 35 cdpath 47 next 40
5471 > 20, 36 change 36 number 35, 49
5472 ?RE? 19 chdir 36 o 27
5483 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-8
\b84
\b4 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be
5487 open 40, 49 timeout 52
5488 optimize 49 ttywerase 52
5490 paragraph 11 unabbrev 44
5491 paragraphs 49 undo 44
5492 preserve 40 unmap 44
5493 previous 40 unnamed buffer 9
5494 previous context 10 v 38
5496 prompt 50 version 44
5502 readonly 50 w9600 52
5504 recover 41 window 52
5508 resize 41 wrapmargin 53
5509 rewind 42 wrapscan 53
5520 showmatch 51 ~ 30, 43
5549 U
\bUS
\bSD
\bD:
\b:1
\b13
\b3-
\b-2
\b2 N
\bNv
\bvi
\bi/
\b/N
\bNe
\bex
\bx R
\bRe
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be
5552 T
\bTa
\bab
\bbl
\ble
\be o
\bof
\bf C
\bCo
\bon
\bnt
\bte
\ben
\bnt
\bts
\bs
5554 Description ...................................... 3
5555 Startup Information .............................. 3
5556 Recovery ......................................... 4
5557 Sizing the Screen ................................ 8
5558 Character Display ................................ 8
5559 Multiple Screens ................................. 9
5560 Regular Expressions and Replacement Strings ...... 9
5561 General Editor Description ....................... 11
5562 Vi Description ................................... 13
5563 Vi Commands ...................................... 18
5564 Vi Text Input Commands ........................... 46
5565 Ex Addressing .................................... 48
5566 Ex Description ................................... 50
5567 Ex Commands ...................................... 51
5568 Set Options ...................................... 69
5569 Additional Features in Nex/Nvi ................... 80
5570 Index ............................................ 83