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