~ubuntu-branches/ubuntu/vivid/vim/vivid

« back to all changes in this revision

Viewing changes to runtime/doc/options.txt

  • Committer: Bazaar Package Importer
  • Author(s): Soren Hansen
  • Date: 2008-11-05 11:37:43 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20081105113743-9i4urcsm3n44mhqe
Tags: 2:7.2.025-2ubuntu1
* Merge from debian unstable, remaining changes:
  - runtime/syntax/debcontrol.vim:
    + Add "metapackages" to the list of valid sections.
  - runtime/syntax/debchangelog.vim:
    + Add "jaunty" to the list of valid suites.
  - Drop vim-lesstif package and lesstif2-dev build-dependency.
  - Enable Python interpreter on basic builds.
  - Create a .pot file for translations.
  - Disable autoindent, line-wrapping, and backup files by default.
  - runtime/syntax/debsources.vim:
    + Add "jaunty" to debsourcesDistrKeyword
  - runtime/syntax/grub.vim:
    + Add Ubuntu-specific 'quiet' keyword.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
*options.txt*   For Vim version 7.1.  Last change: 2008 Feb 24
 
1
*options.txt*   For Vim version 7.2.  Last change: 2008 Aug 06
2
2
 
3
3
 
4
4
                  VIM REFERENCE MANUAL    by Bram Moolenaar
111
111
When 'verbose' is non-zero, displaying an option value will also tell where it
112
112
was last set.  Example: >
113
113
        :verbose set shiftwidth cindent?
114
 
          shiftwidth=4
115
 
                  Last set from modeline
116
 
          cindent
117
 
                  Last set from /usr/local/share/vim/vim60/ftplugin/c.vim
118
 
This is only done when specific option values are requested, not for ":set
119
 
all" or ":set" without an argument.
120
 
When the option was set by hand there is no "Last set" message.  There is only
121
 
one value for all local options with the same name.  Thus the message applies
122
 
to the option name, not necessarily its value.
 
114
<         shiftwidth=4 ~
 
115
                  Last set from modeline ~
 
116
          cindent ~
 
117
                  Last set from /usr/local/share/vim/vim60/ftplugin/c.vim ~
 
118
This is only done when specific option values are requested, not for ":verbose
 
119
set all" or ":verbose set" without an argument.
 
120
When the option was set by hand there is no "Last set" message.
123
121
When the option was set while executing a function, user command or
124
122
autocommand, the script in which it was defined is reported.
125
123
Note that an option may also have been set as a side effect of setting
126
124
'compatible'.
 
125
A few special texts:
 
126
        Last set from modeline ~
 
127
                Option was set in a |modeline|.
 
128
        Last set from --cmd argument ~
 
129
                Option was set with command line argument |--cmd| or +.
 
130
        Last set from -c argument ~
 
131
                Option was set with command line argument |-c|, +, |-S| or
 
132
                |-q|.
 
133
        Last set from environment variable ~
 
134
                Option was set from an environment variable, $VIMINIT,
 
135
                $GVIMINIT or $EXINIT.
 
136
        Last set from error handler ~
 
137
                Option was cleared when evaluating it resulted in an error.
 
138
 
127
139
{not available when compiled without the +eval feature}
128
140
 
129
141
                                                        *:set-termcap* *E522*
265
277
                        Without argument: Display all local option's local
266
278
                        values which are different from the default.
267
279
                        When displaying a specific local option, show the
268
 
                        local value.  For a global option the global value is
 
280
                        local value.  For a global/local boolean option, when
 
281
                        the global value is being used, "--" is displayed
 
282
                        before the option name.
 
283
                        For a global option the global value is
269
284
                        shown (but that might change in the future).
270
285
                        {not in Vi}
271
286
 
797
812
 
798
813
        When 'background' is set Vim will adjust the default color groups for
799
814
        the new value.  But the colors used for syntax highlighting will not
800
 
        change.
 
815
        change.                                 *g:colors_name*
801
816
        When a color scheme is loaded (the "colors_name" variable is set)
802
817
        setting 'background' will cause the color scheme to be reloaded.  If
803
818
        the color scheme adjusts to the value of 'background' this will work.
1148
1163
                                                *'browsedir'* *'bsdir'*
1149
1164
'browsedir' 'bsdir'     string  (default: "last")
1150
1165
                        global
1151
 
                        {not in Vi} {only for Motif and Win32 GUI}
 
1166
                        {not in Vi} {only for Motif, Athena, GTK, Mac and
 
1167
                        Win32 GUI}
1152
1168
        Which directory to use for the file browser:
1153
 
           last         Use same directory as with last file browser.
 
1169
           last         Use same directory as with last file browser, where a
 
1170
                        file was opened or saved.
1154
1171
           buffer       Use the directory of the related buffer.
1155
1172
           current      Use the current directory.
1156
1173
           {path}       Use the specified directory
1263
1280
                        |+file_in_path| feature}
1264
1281
        This is a list of directories which will be searched when using the
1265
1282
        |:cd| and |:lcd| commands, provided that the directory being searched
1266
 
        for has a relative path (not starting with "/", "./" or "../").
 
1283
        for has a relative path, not an absolute part starting with "/", "./"
 
1284
        or "../", the 'cdpath' option is not used then.
1267
1285
        The 'cdpath' option's value has the same form and semantics as
1268
1286
        |'path'|.  Also see |file-searching|.
1269
1287
        The default value is taken from $CDPATH, with a "," prepended to look
1343
1361
                        {not in Vi}
1344
1362
                        {not available when compiled without the |+cindent|
1345
1363
                        feature}
1346
 
        Enables automatic C program indenting  See 'cinkeys' to set the keys
 
1364
        Enables automatic C program indenting.  See 'cinkeys' to set the keys
1347
1365
        that trigger reindenting in insert mode and 'cinoptions' to set your
1348
1366
        preferred indent style.
1349
1367
        If 'indentexpr' is not empty, it overrules 'cindent'.
1711
1729
        tabs followed by spaces as required (unless |'expandtab'| is enabled,
1712
1730
        in which case only spaces are used).  Enabling this option makes the
1713
1731
        new line copy whatever characters were used for indenting on the
1714
 
        existing line.  If the new indent is greater than on the existing
 
1732
        existing line.  'expandtab' has no effect on these characters, a Tab
 
1733
        remains a Tab.  If the new indent is greater than on the existing
1715
1734
        line, the remaining space is filled in the normal manner.
1716
1735
        NOTE: 'copyindent' is reset when 'compatible' is set.
1717
1736
        Also see 'preserveindent'.
2273
2292
          or "\\", the swap file name will be built from the complete path to
2274
2293
          the file with all path separators substituted to percent '%' signs.
2275
2294
          This will ensure file name uniqueness in the preserve directory.
 
2295
          On Win32, when a separating comma is following, you must use "//",
 
2296
          since "\\" will include the comma in the file name.
2276
2297
        - Spaces after the comma are ignored, other spaces are considered part
2277
2298
          of the directory name.  To have a space at the start of a directory
2278
2299
          name, precede it with a backslash.
2423
2444
                        global or local to buffer |global-local|
2424
2445
                        {not in Vi}
2425
2446
        External program to use for "=" command.  When this option is empty
2426
 
        the internal formatting functions are used ('lisp', 'cindent' or
2427
 
        'indentexpr').
 
2447
        the internal formatting functions are used; either 'lisp', 'cindent'
 
2448
        or 'indentexpr'.
2428
2449
        Environment variables are expanded |:set_env|.  See |option-backslash|
2429
2450
        about including spaces and backslashes.
2430
2451
        This option cannot be set from a |modeline| or in the |sandbox|, for
3362
3383
                'guitablabel' can be used to change the text in the labels.
3363
3384
                When 'e' is missing a non-GUI tab pages line may be used.
3364
3385
                The GUI tabs are only supported on some systems, currently
3365
 
                GTK, Motif and MS-Windows.
 
3386
                GTK, Motif, Mac OS/X and MS-Windows.
3366
3387
                                                                *'go-f'*
3367
3388
          'f'   Foreground: Don't use fork() to detach the GUI from the shell
3368
3389
                where it was started.  Use this for programs that wait for the
3618
3639
        When you get bored looking at the highlighted matches, you can turn it
3619
3640
        off with |:nohlsearch|.  As soon as you use a search command, the
3620
3641
        highlighting comes back.
3621
 
        'redrawtime' specifies the maximum time spend on finding matches.
 
3642
        'redrawtime' specifies the maximum time spent on finding matches.
3622
3643
        When the search pattern can match an end-of-line, Vim will try to
3623
3644
        highlight all of the matched text.  However, this depends on where the
3624
3645
        search starts.  This will be the first line in the window or the first
3917
3938
                        local to buffer
3918
3939
                        {not in Vi}
3919
3940
        When doing keyword completion in insert mode |ins-completion|, and
3920
 
        'ignorecase' is also on, the case of the match is adjusted.  If the
3921
 
        typed text contains a lowercase letter where the match has an upper
3922
 
        case letter, the completed part is made lowercase.  If the typed text
3923
 
        has no lowercase letters and the match has a lowercase letter where
3924
 
        the typed text has an uppercase letter, and there is a letter before
3925
 
        it, the completed part is made uppercase.
 
3941
        'ignorecase' is also on, the case of the match is adjusted depending
 
3942
        on the typed text.  If the typed text contains a lowercase letter
 
3943
        where the match has an upper case letter, the completed part is made
 
3944
        lowercase.  If the typed text has no lowercase letters and the match
 
3945
        has a lowercase letter where the typed text has an uppercase letter,
 
3946
        and there is a letter before it, the completed part is made uppercase.
 
3947
        With 'noinfercase' the match is used as-is.
3926
3948
 
3927
3949
                        *'insertmode'* *'im'* *'noinsertmode'* *'noim'*
3928
3950
'insertmode' 'im'       boolean (default off)
3967
3989
        Multi-byte characters 256 and above are always included, only the
3968
3990
        characters up to 255 are specified with this option.
3969
3991
        For UTF-8 the characters 0xa0 to 0xff are included as well.
 
3992
        Think twice before adding white space to this option.  Although a
 
3993
        space may appear inside a file name, the effect will be that Vim
 
3994
        doesn't know where a file name starts or ends when doing completion.
 
3995
        It most likely works better without a space in 'isfname'.
3970
3996
 
3971
3997
        Note that on systems using a backslash as path separator, Vim tries to
3972
3998
        do its best to make it work as you would expect.  That is a bit
3993
4019
        are included.  Normally these are the characters a to z and A to Z,
3994
4020
        plus accented characters.  To include '@' itself use "@-@".  Examples:
3995
4021
                "@,^a-z"        All alphabetic characters, excluding lower
3996
 
                                case letters.
 
4022
                                case ASCII letters.
3997
4023
                "a-z,A-Z,@-@"   All letters plus the '@' character.
3998
4024
        A comma can be included by using it where a character number is
3999
4025
        expected.  Example:
4617
4643
                        global
4618
4644
                        {not in Vi}
4619
4645
        Enable the use of the mouse.  Only works for certain terminals
4620
 
        (xterm, MS-DOS, Win32 |win32-mouse|, QNX pterm, and Linux console
4621
 
        with gpm).  For using the mouse in the GUI, see |gui-mouse|.
 
4646
        (xterm, MS-DOS, Win32 |win32-mouse|, QNX pterm, *BSD console with
 
4647
        sysmouse and Linux console with gpm).  For using the mouse in the
 
4648
        GUI, see |gui-mouse|.
4622
4649
        The mouse can be enabled for different modes:
4623
4650
                n       Normal mode
4624
4651
                v       Visual mode
4873
4900
        name, datestamp and permissions.  This option contains the extra
4874
4901
        information, the nature of which will vary between systems.
4875
4902
        The value of this option is usually set when the file is loaded, and
4876
 
        use to set the file type when file is written.
 
4903
        is used to set the operating system file type when file is written.
4877
4904
        It can affect the pattern matching of the automatic commands.
4878
4905
        |autocmd-osfiletypes|
4879
4906
 
4948
4975
        Note that typing <F10> in paste mode inserts "<F10>", since in paste
4949
4976
        mode everything is inserted literally, except the 'pastetoggle' key
4950
4977
        sequence.
 
4978
        When the value has several bytes 'ttimeoutlen' applies.
4951
4979
 
4952
4980
                                                *'pex'* *'patchexpr'*
4953
4981
'patchexpr' 'pex'       string  (default "")
4986
5014
                        global or local to buffer |global-local|
4987
5015
                        {not in Vi}
4988
5016
        This is a list of directories which will be searched when using the
4989
 
        |gf|, [f, ]f, ^Wf, |:find| and other commands, provided that the file
4990
 
        being searched for has a relative path (not starting with '/').  The
4991
 
        directories in the 'path' option may be relative or absolute.
 
5017
        |gf|, [f, ]f, ^Wf, |:find|, |:sfind|, |:tabfind| and other commands,
 
5018
        provided that the file being searched for has a relative path (not
 
5019
        starting with "/", "./" or "../").  The directories in the 'path'
 
5020
        option may be relative or absolute.
4992
5021
        - Use commas to separate directory names: >
4993
5022
                :set path=.,/usr/local/include,/usr/include
4994
5023
<       - Spaces can also be used to separate directory names (for backwards
5007
5036
        - Environment variables are expanded |:set_env|.
5008
5037
        - When using |netrw.vim| URLs can be used.  For example, adding
5009
5038
          "http://www.vim.org" will make ":find index.html" work.
5010
 
        - Search upwards and downwards in a directory tree:
5011
 
          1) "*" matches a sequence of characters, e.g.: >
5012
 
                :set path=/usr/include/*
5013
 
<            means all subdirectories in /usr/include (but not /usr/include
5014
 
             itself). >
5015
 
                :set path=/usr/*c
5016
 
<            matches /usr/doc and /usr/src.
5017
 
          2) "**" matches a subtree, up to 100 directories deep.  Example: >
5018
 
                :set path=/home/user_x/src/**
5019
 
<            means search in the whole subtree under "/home/usr_x/src".
5020
 
          3) If the path ends with a ';', this path is the startpoint
5021
 
             for upward search.
5022
 
          See |file-searching| for more info and exact syntax.
 
5039
        - Search upwards and downwards in a directory tree using "*", "**" and
 
5040
          ";".  See |file-searching| for info and syntax.
5023
5041
          {not available when compiled without the |+path_extra| feature}
5024
5042
        - Careful with '\' characters, type two to get one in the option: >
5025
5043
                :set path=.,c:\\include
5054
5072
        enabled, in which case only spaces are used).  Enabling this option
5055
5073
        means the indent will preserve as many existing characters as possible
5056
5074
        for indenting, and only add additional tabs or spaces as required.
 
5075
        'expandtab' does not apply to the preserved white space, a Tab remains
 
5076
        a Tab.
5057
5077
        NOTE: When using ">>" multiple times the resulting indent is a mix of
5058
5078
        tabs and spaces.  You might not like this.
5059
5079
        NOTE: 'preserveindent' is reset when 'compatible' is set.
5894
5914
        pattern (if there is one) as possible matches.  Thus, if you have
5895
5915
        matched a C function, you can see a template for what arguments are
5896
5916
        required (coding style permitting).
 
5917
        Note that this doesn't work well together with having "longest" in
 
5918
        'completeopt', because the completion from the search pattern may not
 
5919
        match the typed text.
5897
5920
 
5898
5921
                                 *'showmatch'* *'sm'* *'noshowmatch'* *'nosm'*
5899
5922
'showmatch' 'sm'        boolean (default off)
6285
6308
              directory.
6286
6309
        F S   Full path to the file in the buffer.
6287
6310
        t S   File name (tail) of file in the buffer.
6288
 
        m F   Modified flag, text is " [+]"; " [-]" if 'modifiable' is off.
 
6311
        m F   Modified flag, text is "[+]"; "[-]" if 'modifiable' is off.
6289
6312
        M F   Modified flag, text is ",+" or ",-".
6290
 
        r F   Readonly flag, text is " [RO]".
 
6313
        r F   Readonly flag, text is "[RO]".
6291
6314
        R F   Readonly flag, text is ",RO".
6292
 
        h F   Help buffer flag, text is " [help]".
 
6315
        h F   Help buffer flag, text is "[help]".
6293
6316
        H F   Help buffer flag, text is ",HLP".
6294
 
        w F   Preview window flag, text is " [Preview]".
 
6317
        w F   Preview window flag, text is "[Preview]".
6295
6318
        W F   Preview window flag, text is ",PRV".
6296
 
        y F   Type of file in the buffer, e.g., " [vim]".  See 'filetype'.
 
6319
        y F   Type of file in the buffer, e.g., "[vim]".  See 'filetype'.
6297
6320
        Y F   Type of file in the buffer, e.g., ",VIM".  See 'filetype'.
6298
6321
              {not available when compiled without |+autocmd| feature}
6299
6322
        k S   Value of "b:keymap_name" or 'keymap' when |:lmap| mappings are
6340
6363
              to StatusLineNC for the statusline of non-current windows.
6341
6364
              The number N must be between 1 and 9.  See |hl-User1..9|
6342
6365
 
6343
 
        Display of flags are controlled by the following heuristic:
6344
 
        If a flag text starts with comma it is assumed that it wants to
6345
 
        separate itself from anything but preceding plaintext.  If it starts
6346
 
        with a space it is assumed that it wants to separate itself from
6347
 
        anything but other flags.  That is: A leading comma is removed if the
6348
 
        preceding character stems from plaintext.  A leading space is removed
6349
 
        if the preceding character stems from another active flag.  This will
6350
 
        make a nice display when flags are used like in the examples below.
 
6366
        When displaying a flag, Vim removes the leading comma, if any, when
 
6367
        that flag comes right after plaintext.  This will make a nice display
 
6368
        when flags are used like in the examples below.
6351
6369
 
6352
6370
        When all items in a group becomes an empty string (i.e. flags that are
6353
6371
        not set) and a minwid is not set for the group, the whole group will
6478
6496
           split        If included, split the current window before loading
6479
6497
                        a buffer.  Otherwise: do not split, use current window.
6480
6498
                        Supported in |quickfix| commands that display errors.
 
6499
           newtab       Like "split", but open a new tab page.  Overrules
 
6500
                        "split" when both are present.
6481
6501
 
6482
6502
                                                *'synmaxcol'* *'smc'*
6483
6503
'synmaxcol' 'smc'       number  (default 3000)
6602
6622
 
6603
6623
        Linear searching is done anyway, for one file, when Vim finds a line
6604
6624
        at the start of the file indicating that it's not sorted: >
6605
 
   !_TAG_FILE_SORTED    0       /some command/
 
6625
   !_TAG_FILE_SORTED    0       /some comment/
6606
6626
<       [The whitespace before and after the '0' must be a single <Tab>]
6607
6627
 
6608
6628
        When a binary search was done and no match was found in any of the
7089
7109
        "xterm", when the terminal name doesn't start with "xterm", but it can
7090
7110
        handle xterm mouse codes.
7091
7111
        The "xterm2" value will be set if the xterm version is reported to be
7092
 
        95 of higher.  This only works when compiled with the |+termresponse|
 
7112
        95 or higher.  This only works when compiled with the |+termresponse|
7093
7113
        feature and if |t_RV| is set to the escape sequence to request the
7094
7114
        xterm version number.  Otherwise "xterm2" must be set explicitly.
7095
7115
        If you do not want 'ttymouse' to be set to "xterm2" automatically, set
7424
7444
                        {not in Vi}
7425
7445
        Character you have to type to start wildcard expansion in the
7426
7446
        command-line, as specified with 'wildmode'.
 
7447
        More info here: |cmdline-completion|.
7427
7448
        The character is not recognized when used inside a macro.  See
7428
7449
        'wildcharm' for that.
7429
7450
        Although 'wc' is a number option, you can set it to a special key: >
7441
7462
        you'll never actually type 'wildcharm', just use it in mappings that
7442
7463
        automatically invoke completion mode, e.g.: >
7443
7464
                :set wcm=<C-Z>
7444
 
                :cmap ss so $vim/sessions/*.vim<C-Z>
 
7465
                :cnoremap ss so $vim/sessions/*.vim<C-Z>
7445
7466
<       Then after typing :ss you can use CTRL-P & CTRL-N.
7446
7467
 
7447
7468
                                                *'wildignore'* *'wig'*
7536
7557
<       List all matches without completing, then each full match >
7537
7558
                :set wildmode=longest,list
7538
7559
<       Complete longest common string, then list alternatives.
 
7560
        More info here: |cmdline-completion|.
7539
7561
 
7540
7562
                                                *'wildoptions'* *'wop'*
7541
7563
'wildoptions' 'wop'     string  (default "")
7596
7618
                        feature}
7597
7619
        Minimal number of lines for the current window.  This is not a hard
7598
7620
        minimum, Vim will use fewer lines if there is not enough room.  If the
7599
 
        current window is smaller, its size is increased, at the cost of the
7600
 
        height of other windows.  Set it to 999 to make the current window
7601
 
        always fill the screen (although this has the drawback that ":all"
7602
 
        will create only two windows).  Set it to a small number for normal
7603
 
        editing.
7604
 
        Minimum value is 1.
7605
 
        The height is not adjusted after one of the commands to change the
 
7621
        focus goes to a window that is smaller, its size is increased, at the
 
7622
        cost of the height of other windows.
 
7623
        Set 'winheight' to a small number for normal editing.
 
7624
        Set it to 999 to make the current window fill most of the screen.
 
7625
        Other windows will be only 'winminheight' high.  This has the drawback
 
7626
        that ":all" will create only two windows.  To avoid "vim -o 1 2 3 4"
 
7627
        to create only two windows, set the option after startup is done,
 
7628
        using the |VimEnter| event: >
 
7629
                au VimEnter * set winheight=999
 
7630
<       Minimum value is 1.
 
7631
        The height is not adjusted after one of the commands that change the
7606
7632
        height of the current window.
7607
7633
        'winheight' applies to the current window.  Use 'winminheight' to set
7608
7634
        the minimal height for other windows.