Mercurial > vim
diff runtime/doc/options.txt @ 667:9090f866cd57 v7.0197
updated for version 7.0197
author | vimboss |
---|---|
date | Tue, 14 Feb 2006 22:29:30 +0000 |
parents | 21ab9abf0f08 |
children | 4b8583e82cb8 |
line wrap: on
line diff
--- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 7.0aa. Last change: 2006 Feb 10 +*options.txt* For Vim version 7.0aa. Last change: 2006 Feb 14 VIM REFERENCE MANUAL by Bram Moolenaar @@ -127,7 +127,7 @@ Note that an option may also have been s {not available when compiled without the +eval feature} *:set-termcap* *E522* -For {option} the form "t_xx" may be used to set a termcap option. This will +For {option} the form "t_xx" may be used to set a terminal option. This will override the value from the termcap. You can then use it in a mapping. If the "xx" part contains special characters, use the <t_xx> form: > :set <t_#4>=^[Ot @@ -2036,8 +2036,8 @@ A jump table for the options with a shor global {not in Vi} When set to "msg", error messages that would otherwise be omitted will - be given anyway. This is useful when debugging 'foldexpr' or - 'indentexpr'. + be given anyway. This is useful when debugging 'foldexpr', + 'formatexpr' or 'indentexpr'. When set to "beep", a message will be given when otherwise only a beep would be produced. The values can be combined, separated by a comma. @@ -2882,17 +2882,43 @@ A jump table for the options with a shor global {not in Vi} The name of an external program that will be used to format the lines - selected with the "gq" command. The program must take the input on + selected with the |gq| operator. The program must take the input on stdin and produce the output on stdout. The Unix program "fmt" is such a program. - If this option is an empty string, the internal format function will - be used |C-indenting|. + If the 'formatexpr' option is not empty it will be used instead. + Otherwise, if 'formatprg' option is an empty string, the internal + format function will be used |C-indenting|. Environment variables are expanded |:set_env|. See |option-backslash| about including spaces and backslashes. - This option cannot be set from a |modeline| or in the |sandbox|, for - security reasons. - - *'fsync'* *'fs'* + The expression may be evaluated in the |sandbox|, see + |sandbox-option|. + + *'formatexpr'* *'fex'* +'formatexpr' 'fex' string (default "") + local to buffer + {not in Vi} + {not available when compiled without the |+eval| + feature} + Expression which is evaluated to format a range of lines for the |gq| + operator. The |v:lnum| variable holds the first line to be formatted, + |v:count| the number of lines to be formatted. + When this option is empty 'formatprg' is used. + Example: > + :set formatexp=mylang#Format() +< This will invoke the mylang#Format() function in the + autoload/mylang.vim file in 'runtimepath'. |autoload| + + The expression is also evaluated when 'textwidth' is set and adding + text beyond that limit. This happens under the same conditions as + when internal formatting is used. Make sure the cursor is kept in the + same spot relative to the text then! The |mode()| function will + return "i" or "R" in this situation. When the function returns + non-zero Vim will fall back to using the internal format mechanism. + + The expression may be evaluated in the |sandbox|, see + |sandbox-option|. + + *'fsync'* *'fs'* 'fsync' 'fs' boolean (default on) global {not in Vi} @@ -7016,7 +7042,7 @@ A jump table for the options with a shor 'weirdinvert' 'wiv' boolean (default off) global {not in Vi} - This option has the same effect as the 't_xs' termcap option. + This option has the same effect as the 't_xs' terminal option. It is provided for backwards compatibility with version 4.x. Setting 'weirdinvert' has the effect of making 't_xs' non-empty, and vice versa. Has no effect when the GUI is running.