diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-06-12 23:01:46 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-06-12 23:01:46 +0200 |
commit | c95a302a4c42ec8230473cd4a5e0064d0a143aa8 (patch) | |
tree | ec8985d4cea1e9ace755daa0018a3cf62c62994d /runtime/doc/options.txt | |
parent | 2d35899721da0e9359a9fe1059554f8c4ea7f0c1 (diff) |
Updated runtime files.
Diffstat (limited to 'runtime/doc/options.txt')
-rw-r--r-- | runtime/doc/options.txt | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index fbeeb9edc8..2751fb2bd3 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 7.4. Last change: 2016 Jun 04 +*options.txt* For Vim version 7.4. Last change: 2016 Jun 08 VIM REFERENCE MANUAL by Bram Moolenaar @@ -3337,6 +3337,41 @@ A jump table for the options with a short description can be found at |Q_op|. It is not allowed to change text or jump to another window while evaluating 'foldtext' |textlock|. + *'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 or automatic formatting (see 'formatoptions'). When this + option is empty 'formatprg' is used. + + The |v:lnum| variable holds the first line to be formatted. + The |v:count| variable holds the number of lines to be formatted. + The |v:char| variable holds the character that is going to be + inserted if the expression is being evaluated due to + automatic formatting. This can be empty. Don't insert + it yet! + + Example: > + :set formatexpr=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 expression evaluates to non-zero Vim will fall back to using + the internal format mechanism. + + The expression will be evaluated in the |sandbox| when set from a + modeline, see |sandbox-option|. That stops the option from working, + since changing the buffer text is not allowed. + *'formatoptions'* *'fo'* 'formatoptions' 'fo' string (Vim default: "tcq", Vi default: "vt") local to buffer @@ -3380,41 +3415,6 @@ A jump table for the options with a short description can be found at |Q_op|. This option cannot be set from a |modeline| or in the |sandbox|, for security reasons. - *'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 or automatic formatting (see 'formatoptions'). When this - option is empty 'formatprg' is used. - - The |v:lnum| variable holds the first line to be formatted. - The |v:count| variable holds the number of lines to be formatted. - The |v:char| variable holds the character that is going to be - inserted if the expression is being evaluated due to - automatic formatting. This can be empty. Don't insert - it yet! - - Example: > - :set formatexpr=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 expression evaluates to non-zero Vim will fall back to using - the internal format mechanism. - - The expression will be evaluated in the |sandbox| when set from a - modeline, see |sandbox-option|. That stops the option from working, - since changing the buffer text is not allowed. - *'fsync'* *'fs'* *'nofsync'* *'nofs'* 'fsync' 'fs' boolean (default on) global |