Remove building with NOCRYPTO option
[minix3.git] / external / bsd / nvi / dist / docs / vi.ref / set.opt.texi
blob0a411624008dd5c655b361367f1dd1a5bded49ac
1 @comment  Copyright (c) 1994
2 @comment      The Regents of the University of California.  All rights reserved.
3 @comment  Copyright (c) 1994, 1995, 1996
4 @comment        Keith Bostic.  All rights reserved.
5 @comment 
6 @comment  See the LICENSE file for redistribution information.
7 @comment 
8 @comment      Id: set.opt.texi,v 8.1 2001/08/18 20:43:48 skimo Exp  (Berkeley) Date: 2001/08/18 20:43:48 
9 @comment 
10 @chapter Set Options
12 There are a large number of options that may be set (or unset) to
13 change the editor's behavior.
14 This section describes the options, their abbreviations and their
15 default values.
17 In each entry below, the first part of the tag line is the full name
18 of the option, followed by any equivalent abbreviations.
19 (Regardless of the abbreviations, it is only necessary to use the
20 minimum number of characters necessary to distinguish an abbreviation
21 from all other commands for it to be accepted, in
22 @EV{nex,nvi}.
23 Historically, only the full name and the official abbreviations
24 were accepted by
25 @EV{ex,vi}.
26 Using full names in your startup files and environmental variables will
27 probably make them more portable.)
28 The part in square brackets is the default value of the option.
29 Most of the options are boolean, i.e. they are either on or off,
30 and do not have an associated value.
32 Options apply to both
33 @CO{ex}
34 and
35 @CO{vi}
36 modes, unless otherwise specified.
38 With a few exceptions,
39 all options are settable per screen, i.e. the
40 @OP{tags}
41 option can be set differently in each screen.
42 The exceptions are the
43 @OP{columns},
44 @OP{lines},
45 @OP{secure}
46 and
47 @OP{term}
48 options.
49 Changing these options modifies the respective information for all screens.
51 For information on modifying the options or to display the options and
52 their current values, see the
53 @QQ{set}
54 command in the section entitled
55 @QB{Ex Commands} .
56 @itemize @bullet
57 @cindex altwerase
58 @IP{altwerase [off]}
60 @CO{Vi}
61 only.
62 Change how
63 @CO{vi}
64 does word erase during text input.
65 When this option is set, text is broken up into three classes:
66 alphabetic, numeric and underscore characters, other nonblank
67 characters, and blank characters.
68 Changing from one class to another marks the end of a word.
69 In addition, the class of the first character erased is ignored
70 (which is exactly what you want when erasing pathname components).
71 @cindex autoindent
72 @IP{autoindent, ai [off]}
74 If this option is set, whenever you create a new line (using the
75 @CO{vi}
76 @CO{A},
77 @CO{a},
78 @CO{C},
79 @CO{c},
80 @CO{I},
81 @CO{i},
82 @CO{O},
83 @CO{o},
84 @CO{R},
85 @CO{r},
86 @CO{S},
87 and
88 @CO{s}
89 commands, or the
90 @CO{ex}
91 @CO{append},
92 @CO{change},
93 and
94 @CO{insert}
95 commands) the new line is automatically indented to align the cursor with
96 the first nonblank character of the line from which you created it.
97 Lines are indented using tab characters to the extent possible (based on
98 the value of the
99 @OP{tabstop}
100 option,
101 and if
102 @OP{expandtab}
103 is not set) and then using space characters as necessary.
104 For commands inserting text into the middle of a line, any blank characters
105 to the right of the cursor are discarded, and the first nonblank character
106 to the right of the cursor is aligned as described above.
107 @sp 1
108 The indent characters are themselves somewhat special.
109 If you do not enter more characters on the new line before moving to
110 another line, or entering
111 @LI{<escape>},
112 the indent character will be deleted and the line will be empty.
113 For example, if you enter
114 @LI{<carriage-return>}twice in succession,
115 the line created by the first
116 @LI{<carriage-return>}will not have any characters in it,
117 regardless of the indentation of the previous or subsequent line.
118 @sp 1
119 Indent characters also require that you enter additional erase characters
120 to delete them.
121 For example,
122 if you have an indented line, containing only blanks, the first
123 @LI{<word-erase>}character you enter will erase up to end of the indent characters,
124 and the second will erase back to the beginning of the line.
125 (Historically, only the
126 @LI{<control-D>}key would erase the indent characters.
127 Both the
128 @LI{<control-D>}key and the usual erase keys work in
129 @CO{nvi}.)
130 In addition, if the cursor is positioned at the end of the indent
131 characters, the keys
132 @QT{0<control-D>}
133 will erase all of the indent characters for the current line,
134 resetting the indentation level to 0.
135 Similarly, the keys
136 @QT{^<control-D>}
137 will erase all of the indent characters for the current line,
138 leaving the indentation level for future created lines unaffected.
139 @sp 1
140 Finally, if the
141 @OP{autoindent}
142 option is set, the
143 @CO{S}
145 @CO{cc}
146 commands change from the first nonblank of the line to the end of the
147 line, instead of from the beginning of the line to the end of the line.
148 @cindex autoprint
149 @IP{autoprint, ap [off]}
151 @CO{Ex}
152 only.
153 Cause the current line to be automatically displayed after the
154 @CO{ex}
155 commands
156 @CO{<},
157 @CO{>},
158 @CO{copy},
159 @CO{delete},
160 @CO{join},
161 @CO{move},
162 @CO{put},
163 @CO{t},
164 @CO{Undo},
166 @CO{undo}.
167 This automatic display is suppressed during
168 @CO{global}
170 @CO{v}
171 commands, and for any command where optional flags are used to explicitly
172 display the line.
173 @cindex autowrite
174 @IP{autowrite, aw [off]}
176 If this option is set, the
177 @CO{vi}
178 @CO{!},
179 @CO{^^},
180 @CO{^]}
182 @CO{<control-Z>}
183 commands, and the
184 @CO{ex}
185 @CO{edit},
186 @CO{next},
187 @CO{rewind},
188 @CO{stop},
189 @CO{suspend},
190 @CO{tag},
191 @CO{tagpop},
193 @CO{tagtop}
194 commands automatically write the current file back to the current file name
195 if it has been modified since it was last written.
196 If the write fails, the command fails and goes no further.
197 @sp 1
198 Appending the optional force flag character
199 @QT{!}
200 to the
201 @CO{ex}
202 commands
203 @CO{next},
204 @CO{rewind},
205 @CO{stop},
206 @CO{suspend},
207 @CO{tag},
208 @CO{tagpop},
210 @CO{tagtop}
211 stops the automatic write from being attempted.
212 @sp 1
213 (Historically, the
214 @CO{next}
215 command ignored the optional force flag.)
216 Note, the
217 @CO{ex}
218 commands
219 @CO{edit},
220 @CO{quit},
221 @CO{shell},
223 @CO{xit}
225 @emph{not}
226 affected by the
227 @OP{autowrite}
228 option.
229 @sp 1
231 @OP{autowrite}
232 option is ignored if the file is considered read-only for any reason.
233 @comment  I cannot get a double quote to print between the square brackets
234 @comment  to save my life.  The ONLY way I've been able to get this to work
235 @comment  is with the .tr command.
236 @cindex backup
237 @IP{backup [""]}
239 If this option is set, it specifies a pathname used as a backup file,
240 and, whenever a file is written, the file's current contents are copied
241 to it.
242 The pathname is
243 @QT{#},
244 @QT{%}
246 @QT{!}
247 expanded.
248 @sp 1
249 If the first character of the pathname is
250 @QT{N},
251 a version number is appended to the pathname (and the
252 @QT{N}
253 character is then discarded).
254 Version numbers are always incremented, and each backup file will have
255 a version number one greater than the highest version number currently
256 found in the directory.
257 @sp 1
258 Backup files must be regular files, owned by the real user ID of the
259 user running the editor, and not accessible by any other user.
260 @cindex beautify
261 @IP{beautify, bf [off]}
263 If this option is set, all control characters that are not currently being
264 specially interpreted, other than
265 @LI{<tab>},
266 @LI{<newline>},
268 @LI{<form-feed>},
270 discarded from commands read in by
271 @CO{ex}
272 from command files, and from input text entered to
273 @CO{vi}
274 (either into the file or to the colon command line).
275 Text files read by
276 @EV{ex,vi}
278 @emph{not}
279 affected by the
280 @OP{beautify}
281 option.
282 @cindex cdpath
283 @IP{cdpath [environment variable CDPATH, or current directory]}
285 This option is used to specify a colon separated list of directories
286 which are used as path prefixes for any relative path names used as
287 arguments for the
288 @CO{cd}
289 command.
290 The value of this option defaults to the value of the environmental
291 variable
292 @LI{CDPATH}if it is set, otherwise to the current directory.
293 For compatibility with the POSIX 1003.2 shell, the
294 @CO{cd}
295 command does
296 @emph{not}
297 check the current directory as a path prefix for relative path names
298 unless it is explicitly specified.
299 It may be so specified by entering an empty string or a
300 @QT{.}
301 character into the
302 @LI{CDPATH}variable or the option value.
303 @cindex cedit
304 @IP{cedit [no default]}
306 This option adds the ability to edit the colon command-line history.
307 This option is set to a string.
308 Whenever the first character of that string is entered on the colon
309 command line,
310 you will enter a normal editing window on the collected commands that
311 you've entered on the
312 @CO{vi}
313 colon command-line.
314 You may then modify and/or execute the commands.
315 All normal text editing is available,
316 except that you cannot use
317 @CO{<control-W>}
318 to switch to an alternate screen.
319 Entering a
320 @CO{<carriage-return>}
321 will execute the current line of the screen window as an ex command in
322 the context of the screen from which you created the colon command-line
323 screen,
324 and you will then return to that screen.
325 @sp 1
326 Because of
327 @CO{vi}'s
328 parsing rules, it can be difficult to set the colon command-line edit
329 character to the
330 @LI{<escape>}character.
331 To set it to
332 @LI{<escape>},
334 @QT{set cedit=<literal-next><escape>}.
335 @sp 1
336 If the
337 @OP{cedit}
338 edit option is set to the same character as the
339 @OP{filec}
340 edit option,
341 @CO{vi}
342 will perform colon command-line editing if the character is entered as
343 the first character of the line,
344 otherwise,
345 @CO{vi}
346 will perform file name expansion.
347 @cindex columns
348 @IP{columns, co [80]}
350 The number of columns in the screen.
351 Setting this option causes
352 @EV{ex,vi}
353 to set (or reset) the environmental variable
354 @LI{COLUMNS}.
355 See the section entitled
356 @QB{Sizing the Screen}
357 more information.
358 @cindex comment
359 @IP{comment [off]}
361 @CO{Vi}
362 only.
363 If the first non-empty line of the file begins with the string
364 @QT{#},
365 @QT{/*}
367 @QT{//},
368 this option causes
369 @CO{vi}
370 to skip to the end of that shell, C or C++ comment (probably a
371 terribly boring legal notice) before displaying the file.
372 @cindex directory
373 @IP{directory, dir [environment variable TMPDIR, or /tmp]}
375 The directory where temporary files are created.
376 The environmental variable
377 @LI{TMPDIR}is used as the default value if it exists, otherwise
378 @LI{/tmp}is used.
379 @cindex edcompatible
380 @IP{edcompatible, ed [off]}
382 Remember the values of the
383 @QQ{c}
385 @QQ{g}
386 suffixes to the
387 @CO{substitute}
388 commands, instead of initializing them as unset for each new
389 command.
390 Specifying pattern and replacement strings to the
391 @CO{substitute}
392 command unsets the
393 @QQ{c}
395 @QQ{g}
396 suffixes as well.
397 @cindex escapetime
398 @IP{escapetime [1]}
400 The 10th's of a second
401 @EV{ex,vi}
402 waits for a subsequent key to complete an
403 @LI{<escape>}key mapping.
404 @cindex errorbells
405 @IP{errorbells, eb [off]}
407 @CO{Ex}
408 only.
409 @CO{Ex}
410 error messages are normally presented in inverse video.
411 If that is not possible for the terminal, setting this option causes
412 error messages to be announced by ringing the terminal bell.
413 @cindex expandtab
414 @IP{expandtab, et [off]}
416 Prevent the use of
417 @LI{<tab>}
418 characters in leading whitespace when shifting text, autoindenting,
419 indenting with
420 @CO{<control-T>},
421 or outdenting with
422 @CO{<control-D>}.
423 @cindex exrc
424 @IP{exrc, ex [off]}
426 If this option is turned on in the EXINIT environment variables,
427 or the system or $HOME startup files,
428 the local startup files are read,
429 unless they are the same as the system or $HOME startup files or
430 fail to pass the standard permission checks.
431 See the section entitled
432 @QB{Startup Information}
433 for more information.
434 @cindex extended
435 @IP{extended [off]}
437 This option causes all regular expressions to be treated as POSIX
438 1003.2 Extended Regular Expressions (which are similar to historic
439 @XR{egrep,1}
440 style expressions).
441 @cindex filec
442 @IP{filec [no default]}
444 This option adds the ability to do shell expansion when entering input
445 on the colon command line.
446 This option is set to a string.
447 Whenever the first character of that string is entered on the colon
448 command line,
449 the <blank> delimited string immediately before the cursor is expanded
450 as if it were followed by a
451 @LI{*}character, and file name expansion for the
452 @CO{ex}
453 edit command was done.
454 If no match is found, the screen is flashed and text input resumed.
455 If a single match results, that match replaces the expanded text.
456 In addition, if the single match is for a directory, a
457 @LI{/}character is appended and file completion is repeated.
458 If more than a single match results,
459 any unique prefix shared by the matches replaces the expanded text,
460 the matches are displayed,
461 and text input resumed.
462 @sp 1
463 Because of
464 @CO{vi}'s
465 parsing rules, it can be difficult to set the path completion character
466 to two command values,
467 @LI{<escape>}and
468 @LI{<tab>}.
469 To set it to
470 @LI{<escape>},
472 @QT{set filec=<literal-next><escape>}.
473 To set it to
474 @LI{<tab>},
476 @QT{set filec=\e<tab>}.
477 @sp 1
478 If the
479 @OP{cedit}
480 edit option is set to the same character as the
481 @OP{filec}
482 edit option,
483 @CO{vi}
484 will perform colon command-line editing if the character is entered as
485 the first character of the line,
486 otherwise,
487 @CO{vi}
488 will perform file name expansion.
489 @cindex flash
490 @IP{flash [on]}
492 This option causes the screen to flash instead of beeping the keyboard,
493 on error, if the terminal has the capability.
494 @cindex hardtabs
495 @IP{hardtabs, ht [8]}
497 This option defines the spacing between hardware tab settings, i.e.
498 the tab expansion done by the operating system and/or the terminal
499 itself.
501 @EV{nex,nvi}
502 never writes
503 @LI{<tab>}characters to the terminal, unlike historic versions of
504 @EV{ex,vi},
505 this option does not currently have any affect.
506 @cindex iclower
507 @IP{iclower [off]}
510 @OP{iclower}
511 edit option makes all Regular Expressions case-insensitive,
512 as long as an upper-case letter does not appear in the search string.
513 @cindex ignorecase
514 @IP{ignorecase, ic [off]}
516 This option causes regular expressions, both in
517 @CO{ex}
518 commands and in searches,
519 to be evaluated in a case-insensitive manner.
520 @cindex keytime
521 @IP{keytime [6]}
523 The 10th's of a second
524 @EV{ex,vi}
525 waits for a subsequent key to complete a key mapping.
526 @cindex leftright
527 @IP{leftright [off]}
529 @CO{Vi}
530 only.
531 This option causes the screen to be scrolled left-right to view
532 lines longer than the screen, instead of the traditional
533 @CO{vi}
534 screen interface which folds long lines at the right-hand margin
535 of the terminal.
536 @cindex lines
537 @IP{lines, li [24]}
539 @CO{Vi}
540 only.
541 The number of lines in the screen.
542 Setting this option causes
543 @EV{ex,vi}
544 to set (or reset) the environmental variable
545 @LI{LINES}.
546 See the section entitled
547 @QB{Sizing the Screen}
548 for more information.
549 @cindex lisp
550 @IP{lisp [off]}
552 @CO{Vi}
553 only.
554 This option changes the behavior of the
555 @CO{vi}
556 @CO{(},
557 @CO{)},
558 @strong{@{},
559 @strong{@}},
560 @CO{[[}
562 @CO{]]}
563 commands to match the Lisp language.
564 Also, the
565 @OP{autoindent}
566 option's behavior is changed to be appropriate for Lisp.
567 @sp 1
568 @emph{This option is not yet implemented.}
569 @cindex list
570 @IP{list [off]}
572 This option causes lines to be displayed in an unambiguous fashion.
573 Specifically, tabs are displayed as control characters, i.e.
574 @QT{^I},
575 and the ends of lines are marked with a
576 @QT{$}
577 character.
578 @cindex lock
579 @IP{lock [on]}
581 This option causes the editor to attempt to get an exclusive lock on
582 any file being edited, read or written.
583 Reading or writing a file that cannot be locked produces a warning
584 message, but no other effect.
585 Editing a file that cannot be locked results in a read only edit session,
586 as if the
587 @OP{readonly}
588 edit option were set.
589 @cindex magic
590 @IP{magic [on]}
592 This option is on by default.
593 Turning the
594 @OP{magic}
595 option off causes all regular expression characters except for
596 @QT{^}
598 @QT{$},
599 to be treated as ordinary characters.
600 To re-enable characters individually, when the
601 @OP{magic}
602 option is off,
603 precede them with a backslash
604 @QT{\e}
605 character.
606 See the section entitled
607 @QB{Regular Expressions and Replacement Strings}
608 for more information.
609 @cindex matchchars
610 @IP{matchchars [[]@{@}()<>]}
612 @CO{Vi}
613 only.
614 This option defines the character pairs used by the
615 @CO{%}
616 command.
618 @cindex matchtime
619 @IP{matchtime [7]}
621 @CO{Vi}
622 only.
623 The 10th's of a second
624 @CO{vi}
625 pauses on the matching character when the
626 @OP{showmatch}
627 option is set.
628 @cindex mesg
629 @IP{mesg [on]}
631 This option allows other users to contact you using the
632 @XR{talk,1}
634 @XR{write,1}
635 utilities, while you are editing.
636 @EV{Ex,vi}
637 does not turn message on, i.e. if messages were turned off when the
638 editor was invoked, they will stay turned off.
639 This option only permits you to disallow messages for the edit session.
640 See the
641 @XR{mesg,1}
642 utility for more information.
643 @cindex msgcat
644 @IP{msgcat [./]}
646 This option selects a message catalog to be used to display error and
647 informational messages in a specified language.
648 If the value of this option ends with a '/', it is treated as the name
649 of a directory that contains a message catalog
650 @QT{vi_XXXX},
651 where
652 @QT{XXXX}
653 is the value of the
654 @LI{LANG}environmental variable, if it's set, or the value of the
655 @LI{LC_MESSAGES}environmental variable if it's not.
656 If neither of those environmental variables are set,
657 or if the option doesn't end in a '/',
658 the option is treated as the full path name of the message catalog to use.
659 @sp 1
660 If any messages are missing from the catalog,
661 the backup text (English) is used instead.
662 @sp 1
663 See the distribution file
664 @LI{catalog/README}for additional information on building and installing message catalogs.
665 @cindex modelines
666 @IP{modelines, modeline [off]}
668 If the
669 @OP{modelines}
670 option is set,
671 @EV{ex,vi}
672 has historically scanned the first and last five lines of each file as
673 it is read for editing, looking for any
674 @CO{ex}
675 commands that have been placed in those lines.
676 After the startup information has been processed, and before the user
677 starts editing the file, any commands embedded in the file are executed.
678 @sp 1
679 Commands were recognized by the letters
680 @QQ{e}
682 @QQ{v}
683 followed by
684 @QQ{x}
686 @QQ{i},
687 at the beginning of a line or following a tab or space character,
688 and followed by a
689 @QQ{:},
691 @CO{ex}
692 command, and another
693 @QQ{:}.
694 @sp 1
695 This option is a security problem of immense proportions,
696 and should not be used under any circumstances.
697 @sp 1
698 @emph{This option will never be implemented.}
699 @comment  I cannot get a double quote to print between the square brackets
700 @comment  to save my life.  The ONLY way I've been able to get this to work
701 @comment  is with the .tr command.
702 @cindex noprint
703 @IP{noprint [""]}
705 Characters that are never handled as printable characters.
706 By default, the C library function
707 @XR{isprint,3}
708 is used to determine if a character is printable or not.
709 This edit option overrides that decision.
710 @cindex number
711 @IP{number, nu [off]}
713 Precede each line displayed with its current line number.
714 @cindex octal
715 @IP{octal [off]}
717 Display unknown characters as octal numbers
718 @PQ{"\e###"},
719 instead of the default
720 hexadecimal
721 @PQ{"\ex##"}.
722 @cindex open
723 @IP{open [on]}
725 @CO{Ex}
726 only.
727 If this option is not set, the
728 @CO{open}
730 @CO{visual}
731 commands are disallowed.
732 @cindex optimize
733 @IP{optimize, opt [on]}
735 @CO{Vi}
736 only.
737 Throughput of text is expedited by setting the terminal not to do automatic
738 carriage returns when printing more than one (logical) line of output,
739 greatly speeding output on terminals without addressable cursors when text
740 with leading white space is printed.
741 @sp 1
742 @emph{This option is not yet implemented.}
743 @cindex paragraphs
744 @IP{paragraphs, para [IPLPPPQPP LIpplpipbp]}
746 @CO{Vi}
747 only.
748 Define additional paragraph boundaries for the
749 @CO{@{}
751 @strong{@}}
752 commands.
753 The value of this option must be a character string consisting
754 of zero or more character pairs.
755 @sp 1
756 In the text to be edited, the character string
757 @LI{<newline>.<char-pair>},
758 (where
759 @LI{<char-pair>}is one of the character pairs in the option's value)
760 defines a paragraph boundary.
761 For example, if the option were set to
762 @LI{LaA<space>##},
763 then all of the following additional paragraph boundaries would be
764 recognized:
765 @sp 1
766 @example
767 <newline>.La
768 <newline>.A<space>
769 <newline>.##
770 @end example
771 @cindex path
772 @IP{path []}
774 The path option can be used to specify a <colon>-separated list of
775 paths, similar to the
776 @LI{PATH}environment variable in the shells.
777 If this option is set,
778 the name of the file to be edited is not an absolute pathname,
779 the first component of the filename is not
780 @QT{.}
782 @QT{..},
783 and the file to be edited doesn't exist in the current directory,
784 the elements of the
785 @OP{path}
786 option are sequentially searched for a file of the specified name.
787 If such a file is found, it is edited.
788 @comment  I cannot get a double quote to print between the square brackets
789 @comment  to save my life.  The ONLY way I've been able to get this to work
790 @comment  is with the .tr command.
791 @cindex print
792 @IP{print [""]}
794 Characters that are always handled as printable characters.
795 By default, the C library function
796 @XR{isprint,3}
797 is used to determine if a character is printable or not.
798 This edit option overrides that decision.
799 @cindex prompt
800 @IP{prompt [on]}
802 @CO{Ex}
803 only.
804 This option causes
805 @CO{ex}
806 to prompt for command input with a
807 @QT{:}
808 character; when it is not set, no prompt is displayed.
809 @cindex readonly
810 @IP{readonly, ro [off]}
812 This option causes a force flag to be required to attempt to write the file.
813 Setting this option is equivalent to using the
814 @strong{-R}
815 command line option,
816 or executing the
817 @CO{vi}
818 program using the name
819 @CO{view}.
820 @sp 1
822 @OP{readonly}
823 edit option is not usually persistent, like other edit options.
824 If the
825 @strong{-R}
826 command line option is set,
827 @CO{vi}
828 is executed as
829 @CO{view},
830 or the
831 @OP{readonly}
832 edit option is explicitly set,
833 all files edited in the screen will be marked readonly,
834 and the force flag will be required to write them.
835 However, if none of these conditions are true,
836 or the
837 @OP{readonly}
838 edit option is explicitly unset,
839 then the
840 @OP{readonly}
841 edit option will toggle based on the write permissions of the file currently
842 being edited as of when it is loaded into the edit buffer.
843 In other words, the
844 @OP{readonly}
845 edit option will be set if the current file lacks write permissions,
846 and will not be set if the user has write permissions for the file.
847 @cindex recdir
848 @IP{recdir [/var/tmp/vi.recover]}
850 The directory where recovery files are stored.
851 @sp 1
852 If you change the value of
853 @OP{recdir},
854 be careful to choose a directory whose contents are not regularly
855 deleted.
856 Bad choices include directories in memory based filesystems,
858 @LI{/tmp},
859 on most systems,
860 as their contents are removed when the machine is rebooted.
861 @sp 1
862 Public directories like
863 @LI{/usr/tmp}and
864 @LI{/var/tmp}are usually safe, although some sites periodically prune old files
865 from them.
866 There is no requirement that you use a public directory,
867 e.g. a sub-directory of your home directory will work fine.
868 @sp 1
869 Finally, if you change the value of
870 @OP{recdir},
871 you must modify the recovery script to operate in your chosen recovery
872 area.
873 @sp 1
874 See the section entitled
875 @QB{Recovery}
876 for further information.
877 @cindex redraw
878 @IP{redraw, re [off]}
880 @CO{Vi}
881 only.
882 The editor simulates (using great amounts of output), an intelligent
883 terminal on a dumb terminal (e.g. during insertions in
884 @CO{vi}
885 the characters to the right of the cursor are refreshed as each input
886 character is typed).
887 @sp 1
888 @emph{This option is not yet implemented.}
889 @cindex remap
890 @IP{remap [on]}
892 If this option is set,
893 it is possible to define macros in terms of other macros.
894 Otherwise, each key is only remapped up to one time.
895 For example, if
896 @QT{A}
897 is mapped to
898 @QT{B},
900 @QT{B}
901 is mapped to
902 @QT{C},
903 The keystroke
904 @QT{A}
905 will be mapped to
906 @QT{C}
907 if the
908 @OP{remap}
909 option is set, and to
910 @QT{B}
911 if it is not set.
912 @cindex report
913 @IP{report [5]}
915 Set the threshold of the number of lines that need to be changed or
916 yanked before a message will be displayed to the user.
917 For everything but the yank command, the value is the largest value
918 about which the editor is silent, i.e. by default, 6 lines must be
919 deleted before the user is notified.
920 However, if the number of lines yanked is greater than
921 @emph{or equal to}
922 the set value, it is reported to the user.
923 @cindex ruler
924 @IP{ruler [off]}
926 @CO{Vi}
927 only.
928 Display a row/column ruler on the colon command line.
929 @cindex scroll
930 @IP{scroll, scr [(environment variable LINES - 1) / 2]}
932 Set the number of lines scrolled by the
933 @CO{ex}
934 @CO{<control-D>}
936 @CO{<end-of-file>}
937 commands.
938 @sp 1
939 Historically, the
940 @CO{ex}
941 @CO{z}
942 command, when specified without a count, used two times the size of the
943 scroll value; the POSIX 1003.2 standard specified the window size, which
944 is a better choice.
945 @cindex searchincr
946 @IP{searchincr [off]}
949 @OP{searchincr}
950 edit option makes the search commands
951 @CO{/}
953 @CO{?}
954 incremental, i.e. the screen is updated and the cursor moves to the matching
955 text as the search pattern is entered.
956 If the search pattern is not found,
957 the screen is beeped and the cursor remains on the colon-command line.
958 Erasing characters from the search pattern backs the cursor up to the
959 previous matching text.
960 @cindex sections
961 @IP{sections, sect [NHSHH HUnhsh]}
963 @CO{Vi}
964 only.
965 Define additional section boundaries for the
966 @CO{[[}
968 @CO{]]}
969 commands.
971 @OP{sections}
972 option should be set to a character string consisting of zero or
973 more character pairs.
974 In the text to be edited, the character string
975 @LI{<newline>.<char-pair>},
976 (where
977 @LI{<char-pair>}is one of the character pairs in the option's value),
978 defines a section boundary in the same manner that
979 @OP{paragraphs}
980 option boundaries are defined.
981 @cindex secure
982 @IP{secure [off]}
985 @OP{secure}
986 edit option turns off all access to external programs.
987 This means that the versions of the
988 @CO{read}
990 @CO{write}
991 commands that filter text through other programs,
993 @CO{vi}
994 @CO{!}
996 @CO{<control-Z>}
997 commands,
999 @CO{ex}
1000 @CO{!},
1001 @CO{script},
1002 @CO{shell},
1003 @CO{stop}
1005 @CO{suspend}
1006 commands and file name expansion will not be permitted.
1007 Once set,
1009 @OP{secure}
1010 edit option may not be unset.
1011 @cindex shell
1012 @IP{shell, sh [environment variable SHELL, or /bin/sh]}
1014 Select the shell used by the editor.
1015 The specified path is the pathname of the shell invoked by the
1016 @CO{vi}
1017 @CO{!}
1018 shell escape command and by the
1019 @CO{ex}
1020 @CO{shell}
1021 command.
1022 This program is also used to resolve any shell meta-characters in
1023 @CO{ex}
1024 commands.
1025 @comment  I cannot get a double quote to print between the square brackets
1026 @comment  to save my life.  The ONLY way I've been able to get this to work
1027 @comment  is with the .tr command.
1028 @cindex shellmeta
1029 @comment @IP{shellmeta [~@{[*?@$`'"\e]}
1030 @item @strong{shellmeta [~@{[*?$`'"\]}
1032 The set of characters that
1033 @CO{ex}
1034 checks for when doing file name expansion.
1035 If any of the specified characters are found in the file name arguments
1036 to the
1037 @CO{ex}
1038 commands,
1039 the arguments are expanded using the program defined by the
1040 @OP{shell}
1041 option.
1042 The default set of characters is a union of meta characters
1043 from the Version 7 and the Berkeley C shell.
1044 @cindex shiftwidth
1045 @IP{shiftwidth, sw [8]}
1047 Set the autoindent and shift command indentation width.
1048 This width is used by the
1049 @OP{autoindent}
1050 option and by the
1051 @CO{<},
1052 @CO{>},
1054 @CO{shift}
1055 commands.
1056 @cindex showmatch
1057 @IP{showmatch, sm [off]}
1059 @CO{Vi}
1060 only.
1061 This option causes
1062 @CO{vi},
1063 when a
1064 @comment QT
1065 ``@code{@}}''
1067 @QT{)}
1068 is entered, to briefly move the cursor the matching
1069 @comment QT
1070 ``@code{@{}''
1072 @QT{(}.
1073 See the
1074 @OP{matchtime}
1075 option for more information.
1076 @cindex showmode
1077 @IP{showmode, smd [off]}
1079 @CO{Vi}
1080 only.
1081 This option causes
1082 @CO{vi}
1083 to display a string identifying the current editor mode on the colon
1084 command line.
1085 The string is preceded by an asterisk (``*'') if the file has been
1086 modified since it was last completely written,
1087 @cindex sidescroll
1088 @IP{sidescroll [16]}
1090 @CO{Vi}
1091 only.
1092 Sets the number of columns that are shifted to the left or right,
1093 when
1094 @CO{vi}
1095 is doing left-right scrolling and the left or right margin is
1096 crossed.
1097 See the
1098 @OP{leftright}
1099 option for more information.
1100 @cindex slowopen
1101 @IP{slowopen, slow [off]}
1103 This option affects the display algorithm used by
1104 @CO{vi},
1105 holding off display updating during input of new text to improve
1106 throughput when the terminal in use is slow and unintelligent.
1107 @sp 1
1108 @emph{This option is not yet implemented.}
1109 @cindex sourceany
1110 @IP{sourceany [off]}
1112 If this option is turned on,
1113 @CO{vi}
1114 historically read startup files that were owned by someone other than
1115 the editor user.
1116 See the section entitled
1117 @QB{Startup Information}
1118 for more information.
1119 This option is a security problem of immense proportions,
1120 and should not be used under any circumstances.
1121 @sp 1
1122 @emph{This option will never be implemented.}
1123 @cindex tabstop
1124 @IP{tabstop, ts [8]}
1126 This option sets tab widths for the editor display.
1127 @cindex taglength
1128 @IP{taglength, tl [0]}
1130 This option sets the maximum number of characters that are considered
1131 significant in a tag name.
1132 Setting the value to 0 makes all of the characters in the tag name
1133 significant.
1134 @cindex tags
1135 @IP{tags, tag [tags /var/db/libc.tags /sys/kern/tags]}
1137 Sets the list of tags files, in search order,
1138 which are used when the editor searches for a tag.
1139 @cindex term
1140 @IP{term, ttytype, tty [environment variable TERM]}
1142 Set the terminal type.
1143 Setting this option causes
1144 @EV{ex,vi}
1145 to set (or reset) the environmental variable
1146 @LI{TERM}.
1147 @cindex terse
1148 @IP{terse [off]}
1150 This option has historically made editor messages less verbose.
1151 It has no effect in this implementation.
1152 See the
1153 @OP{verbose}
1154 option for more information.
1155 @cindex tildeop
1156 @IP{tildeop [off]}
1158 Modify the
1159 @CO{~}
1160 command to take an associated motion.
1161 @cindex timeout
1162 @IP{timeout, to [on]}
1164 If this option is set,
1165 @EV{ex,vi}
1166 waits for a specific period for a subsequent key to complete a key
1167 mapping (see the
1168 @OP{keytime}
1169 option).
1170 If the option is not set, the editor waits until enough keys are
1171 entered to resolve the ambiguity, regardless of how long it takes.
1172 @cindex ttywerase
1173 @IP{ttywerase [off]}
1175 @CO{Vi}
1176 only.
1177 This option changes how
1178 @CO{vi}
1179 does word erase during text input.
1180 If this option is set, text is broken up into two classes,
1181 blank characters and nonblank characters.
1182 Changing from one class to another marks the end of a word.
1183 @cindex verbose
1184 @IP{verbose [off]}
1186 @CO{Vi}
1187 only.
1188 @CO{Vi}
1189 historically bells the terminal for many obvious mistakes, e.g. trying
1190 to move past the left-hand margin, or past the end of the file.
1191 If this option is set, an error message is displayed for all errors.
1192 @cindex w300
1193 @IP{w300 [no default]}
1195 @CO{Vi}
1196 only.
1197 Set the window size if the baud rate is less than 1200 baud.
1198 See the
1199 @OP{window}
1200 option for more information.
1201 @cindex w1200
1202 @IP{w1200 [no default]}
1204 @CO{Vi}
1205 only.
1206 Set the window size if the baud rate is equal to 1200 baud.
1207 See the
1208 @OP{window}
1209 option for more information.
1210 @cindex w9600
1211 @IP{w9600 [no default]}
1213 @CO{Vi}
1214 only.
1215 Set the window size if the baud rate is greater than 1200 baud.
1216 See the
1217 @OP{window}
1218 option for more information.
1219 @cindex warn
1220 @IP{warn [on]}
1222 @CO{Ex}
1223 only.
1224 This option causes a warning message to the terminal if the file has
1225 been modified, since it was last written, before a
1226 @CO{!}
1227 command.
1228 @cindex window
1229 @IP{window, w, wi [environment variable LINES - 1]}
1231 This option determines the default number of lines in a screenful,
1232 as displayed by the
1233 @CO{z}
1234 command.
1235 It also determines the number of lines scrolled by the
1236 @CO{vi}
1237 commands
1238 @CO{<control-B>}
1240 @CO{<control-F>},
1241 and the default number of lines scrolled by the
1242 @CO{vi}
1243 commands
1244 @CO{<control-D>}
1246 @CO{<control-U>}.
1247 The value of window can be unrelated to the real screen size,
1248 although it starts out as the number of lines on the screen.
1249 See the section entitled
1250 @QB{Sizing the Screen}
1251 for more information.
1252 Setting the value of the
1253 @OP{window}
1254 option is the same as using the
1255 @strong{-w}
1256 command line option.
1257 @sp 1
1258 If the value of the
1259 @OP{window}
1260 option (as set by the
1261 @OP{window},
1262 @OP{w300},
1263 @OP{w1200}
1265 @OP{w9600}
1266 options) is smaller than the actual size of the screen,
1267 large screen movements will result in displaying only that smaller
1268 number of lines on the screen.
1269 (Further movements in that same area will result in the screen being
1270 filled.)
1271 This can provide a performance improvement when viewing different
1272 places in one or more files over a slow link.
1273 @sp 1
1274 Resetting the window size does not reset the default number of lines
1275 scrolled by the
1276 @CO{<control-D>}
1278 @CO{<control-U>}
1279 commands.
1280 @cindex windowname
1281 @IP{windowname [off]}
1283 @CO{Vi}
1284 changes the name of the editor's icon/window to the current file name
1285 when it's possible and not destructive, i.e.,
1286 when the editor can restore it to its original value on exit or when
1287 the icon/window will be discarded as the editor exits.
1288 If the
1289 @OP{windowname}
1290 edit option is set,
1291 @CO{vi}
1292 will change the icon/window name even when it's destructive and the
1293 icon/window name will remain after the editor exits.
1294 (This is the case for
1295 @XR{xterm,1}).
1296 @cindex wraplen
1297 @IP{wraplen, wl [0]}
1299 This option is identical to the
1300 @OP{wrapmargin}
1301 option, with the exception that it specifies the number of columns
1302 from the
1303 @emph{left}
1304 margin before the line splits, not the right margin.
1305 @sp 1
1306 If both
1307 @OP{wraplen}
1309 @OP{wrapmargin}
1310 are set, the
1311 @OP{wrapmargin}
1312 value is used.
1313 @cindex wrapmargin
1314 @IP{wrapmargin, wm [0]}
1316 @CO{Vi}
1317 only.
1318 If the value of the
1319 @OP{wrapmargin}
1320 option is non-zero,
1321 @CO{vi}
1322 will split lines so that they end at least that number of columns
1323 before the right-hand margin of the screen.
1324 (Note, the value of
1325 @OP{wrapmargin}
1327 @emph{not}
1328 a text length.
1329 In a screen that is 80 columns wide, the command
1330 @QT{:set wrapmargin=8}
1331 attempts to keep the lines less than or equal to 72 columns wide.)
1332 @sp 1
1333 Lines are split at the previous whitespace character closest to the
1334 number.
1335 Any trailing whitespace characters before that character are deleted.
1336 If the line is split because of an inserted
1337 @LI{<space>}or
1338 @LI{<tab>}character, and you then enter another
1339 @LI{<space>}character, it is discarded.
1340 @sp 1
1341 If wrapmargin is set to 0,
1342 or if there is no blank character upon which to split the line,
1343 the line is not broken.
1344 @sp 1
1345 If both
1346 @OP{wraplen}
1348 @OP{wrapmargin}
1349 are set, the
1350 @OP{wrapmargin}
1351 value is used.
1352 @cindex wrapscan
1353 @IP{wrapscan, ws [on]}
1355 This option causes searches to wrap around the end or the beginning
1356 of the file, and back to the starting point.
1357 Otherwise, the end or beginning of the file terminates the search.
1358 @cindex writeany
1359 @IP{writeany, wa [off]}
1361 If this option is set, file-overwriting checks that would usually be
1362 made before the
1363 @CO{write}
1365 @CO{xit}
1366 commands, or before an automatic write (see the
1367 @OP{autowrite}
1368 option), are not made.
1369 This allows a write to any file, provided the file permissions allow it.
1370 @end itemize