next up previous contents
Next: Regular Expressions Up: Configuring vi/ex Editor Previous: Configuring vi/ex Editor

Option Descriptions

Each option is recognized by vi or ex (or both) as indicated and some can be abbreviated.

1.
autoindent (vi/ex)
abbr: ai default: noai

To change autoindent on a new line, space over to the desired column to increase indent. To decrease indent to previous shiftwidth value, use <ctrl>D as first character in the line. To input a single line with no indent and return to previous indent, use ^ followed by <ctrl>D at beg of unindented line. If a new line starts with one or more <tab>s or <space>s, the next following line is started at the new indent.

2.
autoprint (ex)
abbr: ap default: ap

Option prints current line after the commands:
copy, delete, join, l, move, shift, substitute, undo
essentially autoprint performs the same as the p flag at the end of each of above commands.

3.
autowrite (vi/ex)
abbr: aw default: noaw

Buffer contents is written to the current file if vi or ex encounters:
rewind, tag, ! (shell escape)
In vi ^ (switch files) or ^| (tag goto) trigger autowrite. If we want to bypass autowrite, we can use ! (forced command). To prevent autowrite:


quit! instead of quit
edit instead of next
rewind! instead of rewind
stop! followed by the tag! command instead of tag
shell instead of !


from vi:

:e# (switching between two files)

:ta! (using tag files to find text segments)

4.
beautify (vi/ex)
abbr: bf default: nobf

Allows to eliminate all control characters except <tab>, newline and formfeed when we enter text in insert or append mode.

5.
closepunct (vi/ex)
abbr: none default: '".,;)]}

Define punctuation for words.

6.
directory (vi/ex)
abbr: dir default: dir=/var/tmp

Specifies which directory (platform dependent) is used by the editor for temporary file buffering. Option does not affect the buffer location if it is set during the session. Used for recovery after crash, file system full, etc.

7.
edcompatible (vi/ex)
abbr: ed default: noed

When this option is enabled, if g (global) or c (check) flags are present in a substitute command, the flags are toggled and the command is processed accordingly.

8.
errorbells (vi/ex)
abbr: eb default: noeb

Used only on terminals that do not support inverse video to print messages.

9.
flash
abbr: fl default: fl

Use visible flash rather than bell.

10.
hardtabs (vi/ex)
abbr: ht default: ht=8

Defines spacing between hardware <tab> setting and number of spaces used by the system when expanding <tab> characters.

11.
ignorecase (vi/ex)
abbr: ic default: noic

Matching regular expressions, command maps all uppercase characters in text to lowercase.

12.
lisp (vi/ex)
abbr: none default: nolisp

Special autoindent for Lisp source.

13.
list (vi/ex)
abbr: none default: nolist

Shows tabs and newline.

14.
magic (vi/ex)
abbr: none default: magic

Setting nomagic reduces the number of regular expression metacharacters to only ^ and $. To reenable metacharacters while in nomagic, precede them with \.

15.
mesg (vi/ex)
abbr: none default: mesg

Enables other users to send messages to terminal.

16.
modeline (vi/ex)
abbr: none default: nomodeline

With modeline the editor scans the first and last five lines in file looking for ex commands. modelines must appear in a single line as:

ex: set <option>:

To separate multiple command on a single line, use | (vertical bar).

17.
novice
abbr: none default: nonovice

Guided usage for newcomers.

18.
number (vi/ex)
abbr: nu default: nonu

Displays lines with line number.

19.
open (ex)
abbr: op default: open

Allows entry to vi mode from ex

20.
optimize (vi/ex)
abbr: opt default: noopt

Suppresses automatic CR by the terminal when direct cursor addressing is not supported. Speed up operation of terminal without cursor addressing.

21.
paragraphs (vi/ex)
abbr: para default: paragraphs=IPLPPPQPP LIpplpipbp

Specifies the one/two-character macro name to be used by nroff.

22.
partialcharacter
abbr: pc default: -

Undocumented.

23.
prompt (ex)
abbr: none default: prompt

Editor prompts for new commands by typing : (colon), the ex prompt.

24.
readonly (vi/ex)
abbr: ro default: noreadonly

Set readonly attribute to editing file.

25.
redraw (vi/ex)
abbr: none default: redraw

Option simulates intelligent on dumb terminal. Editor prints new characters on current line to the right of cursor and reprints lines as needed when inserting, deleting or changing visible characters on display.

26.
remap (vi/ex)
abbr: none default: remap

Links a macro directly to last macro found in series. For examples if a is mapped to b and b to c, remap will map a to c.

27.
report (vi/ex)
abbr: none default: report=5

Sets a threshold of changes (number of lines). Editor will notify when this threshold is exceeded.

28.
scroll (vi/ex)
abbr: none default: scroll=11

Sets number of lines scrolled when editor receives <ctrl>D.

29.
sections (vi/ex)
abbr: sect default: sect=NHSHH HUnhsh

Specifies the one/two-character macro name to be used by nroff.

30.
shell (vi/ex)
abbr: sh default: sh=/bin/sh

Defines path and filename of user SHELL environment variable.

31.
shiftwidth (vi/ex)
abbr: sw default: sw=8

Sets spacing between <tab> stops. The editor uses shiftwidth to reverse tabbing with <ctrl>D, when using autoindent while appending text, and when using the << and >> shift commands.

32.
showmatch (vi/ex)
abbr: sm default: nosm

In open mode, while inserting text, the cursor moves to the matching open parenthesis or curly bracket ( or { for one second when the closing item ) or } is typed and then returns to closing matching character.

33.
showmode (vi)
abbr: smd default: nosmd

Display at screen bottom whether vi is in insert mode.

34.
slowopen (vi/ex)
abbr: slow default: noslow

Only for slow terminals.

35.
tabstop (vi/ex)
abbr: ts default: tabstop=8

Defines tab spacing used when the editor expands tabs.

36.
taglength (vi/ex)
abbr: tl default: tl=0

Defines the maximum number of characters considered significant in a tag. Setting tl to 0 makes all characters significant.

37.
tags (vi/ex)
abbr: none default: tags=tags /usr/lib/tags

Defines path and filename to be used as tag files for the tag command or the -t editor startup option.

38.
term (vi/ex)
abbr: none default: term=vt300

Defines terminal type.

39.
terse (vi/ex)
abbr: none default: noterse

Types shorter error diagnostics.

40.
timeout (vi/ex)
abbr: none default: timeout

If set, the timeout function is enabled, meaning that if an escape character is not followed within the time limit by another character, the escape is treated as a separate character rather than as part of a two-character sequence.

41.
ttytype (vi/ex)
abbr: none default: ttytype=vt300

Defines ttytype for the terminal in use with the editor.

42.
warn (vi/ex)
abbr: none default: warn

The editor displays the following warning message:
\framebox{\texttt{No write since last change}}
before the ! shell subcommand executes a shell command, when the editing buffer has been changed over the threshold without writing.

43.
window (vi/ex)
abbr: none default: window=23

Specifies the number of lines displayed in a text window.

44.
wrapscan (vi)
abbr: ws default: wrapscan

Pattern searches resulting from the /?nN search commands automatically wrap around the file to opposite EOF and continue whenever BOF or EOF is reached.

45.
wrapmargin (vi/ex)
abbr: wm default: wrapmargin=0

Specifies the number of chars from the right margin the editor should use for automatic wrapping, i.e. force automatic insertion of <LF><NL> sequences.

46.
writeany
abbr: wa default: nowriteany

Option inhibits checks before write command, so we can write to any file that system's protection will allow.

47.
nosourceany

Allows the use of the source command of a file not owned by user.


next up previous contents
Next: Regular Expressions Up: Configuring vi/ex Editor Previous: Configuring vi/ex Editor
Marisa Luvisetto
2000-12-20