->Title Page
->Intro
->Unix
->Vi editor
-->Basics
-->Vi reference
--->Move commands
--->Search
--->Undo
--->Insert
--->Delete
--->Changing text
--->Substitution
--->Yanking
--->Insert mode
--->Display commands
--->Files
--->Macros
--->Shell commands
--->Vi Startup
->Important Options
-->Miscellaneous tips
->Mirror sites
->Further reading

[ Up ]
[Prev][Home][Next]
[Author]

Vi ---> Important Options

  
    ai                      | autoindent - In append mode after a <cr> the
                            |   cursor will move directly below the first
                            |   CHAR on the previous line.  However, if the
                            |   option `lisp' is set, the cursor will align
                            |   at the first argument to the last open list.
    aw                      | autowrite - Write at every shell escape
                            |   (useful when compiling from within vi).
    dir=<string>            | directory - The directory for vi to make
                            |   temporary files (default `/tmp').
    eb                      | errorbells - Beeps when you goof
                            |   (not on every terminal).
    ic                      | ignorecase - No distinction between upper and
                            |   lower cases when searching.
    lisp                    | Redefine the following commands:
                            |   `(', `)'   - move backward (forward) over
                            |                S-expressions
                            |   `{', `}'   - idem, but don't stop at atoms
                            |   `[[', `]]' - go to previous (next) line
                            |                beginning with a `('
                            |   See option `ai'.
    list                    | <lf> is shown as `$', <ht> as `^I'.
    magic                   | If this option is set (default), the chars `.',
                            |   `[' and `*' have special meanings within search
                            |   and `ex' substitute commands.  To deprive such
                            |   a char of its special function it must be
                            |   preceded by a `\'.  If the option is turned off
                            |   it's just the other way around.  Meta-chars:
                            |   ^<string>    - <string> must begin the line
                            |   <string>$    - <string> must end the line
                            |   .            - matches any char
                            |   [a-z]        - matches any char in the range
                            |   [^a-z]       - any char not in the range
                            |   [<string>]   - matches any char in <string>
                            |   [^<string>]  - any char not in <string>
                            |   <char>*      - 0 or more <char>s
                            |   \<<string>   - <string> must begin a word
                            |   <string>\>   - <string> must end a word
    modeline                | When you read an existing file into the buffer,
                            |   and this option is set, the first and last 5
                            |   lines are checked for editing commands in the
                            |   following form:
                            |
                            |     <sp>vi:set options|map ...|ab ...|!...:
                            |
                            |   Instead of <sp> a <ht> can be used, instead of
                            |   `vi' there can be `ex'.  Warning: this option
                            |   could have nasty results if you edit a file
                            |   containing `strange' modelines.
    nu                      | number - Numbers before the lines.
    para=<string>           | paragraphs - Every pair of chars in <string> is
                            |   considered a paragraph delimiter nroff macro
                            |   (for `{' and `}').  A <sp> preceded by a `\'
                            |   indicates the previous char is a single letter
                            |   macro.  `:set para=P\ bp' introduces `.P' and
                            |   `.bp' as paragraph delimiters.  Empty lines and
                            |   section boundaries are paragraph boundaries
                            |   too.
    redraw                  | The screen remains up to date.
    remap                   | If on (default), macros are repeatedly
                            |   expanded until they are unchanged.
                            |   Example: if `o' is mapped to `A', and `A'
                            |   is mapped to `I', then `o' will map to `I'
                            |   if `remap' is set, else it will map to `A'.
    report=<*>              | Vi reports whenever e.g. a delete
                            |   or yank command affects <*> or more lines.
    ro                      | readonly - The file is not to be changed.
                            |   However, `:w!' will override this option.
    sect=<string>           | sections - Gives the section delimiters (for `[['
                            |   and `]]'); see option `para'. A `{' beginning a
                            |   line also starts a section (as in C functions).
    sh=<string>             | shell - The program to be used for shell escapes
                            |   (default `$SHELL' (default `/bin/sh')).
    sw=<*>                  | shiftwidth - Gives the shiftwidth (default 8
                            |   positions).
    sm                      | showmatch - Whenever you append a `)', vi shows
                            |   its match if it's on the same page; also with
                            |   `{' and `}'.  If there's no match at all, vi
                            |   will beep.
    taglength=<*>           | The number of significant characters in tags
                            |   (0 = unlimited).
    tags=<string>           | The space-separated list of tags files.
    terse                   | Short error messages.
    to                      | timeout - If this option is set, append mode
                            |   mappings will be interpreted only if they're
                            |   typed fast enough.
    ts=<*>                  | tabstop - The length of a <ht>; warning: this is
                            |   only IN the editor, outside of it <ht>s have
                            |   their normal length (default 8 positions).
    wa                      | writeany - No checks when writing (dangerous).
    warn                    | Warn you when you try to quit without writing.
    wi=<*>                  | window - The default number of lines vi shows.
    wm=<*>                  | wrapmargin - In append mode vi automatically
                            |   puts a <lf> whenever there is a <sp> or <ht>
                            |   within <wm> columns from the right margin
                            |   (0 = don't put a <lf> in the file, yet put it
                            |   on the screen).
    ws                      | wrapscan - When searching, the end is
                            |   considered `stuck' to the begin of the file.
    :set <option>           | Turn <option> on.
    :set no<option>         | Turn <option> off.
    :set <option>=<value>   | Set <option> to <value>.
    :set                    | Show all non-default options and their values.
    :set <option>?          | Show <option>'s value.
    :set all                | Show all options and their values.

Site Statistics

This section is based on "Vi Reference" by Maarten Litmaath et al.

t a y l o r@l i n u x b o x.c o m

© 1993-1998 Christopher C. Taylor