comparison runtime/doc/eval.txt @ 5862:306caa30d83b

Runtime file updates.
author Bram Moolenaar <bram@vim.org>
date Thu, 01 May 2014 14:08:19 +0200
parents d735e62f5925
children 8e9db1f27a00
comparison
equal deleted inserted replaced
5861:609b7c0be284 5862:306caa30d83b
1 *eval.txt* For Vim version 7.4. Last change: 2014 Apr 06 1 *eval.txt* For Vim version 7.4. Last change: 2014 Apr 29
2 2
3 3
4 VIM REFERENCE MANUAL by Bram Moolenaar 4 VIM REFERENCE MANUAL by Bram Moolenaar
5 5
6 6
2733 $ENVNAME environment variable (could also be 2733 $ENVNAME environment variable (could also be
2734 done by comparing with an empty 2734 done by comparing with an empty
2735 string) 2735 string)
2736 *funcname built-in function (see |functions|) 2736 *funcname built-in function (see |functions|)
2737 or user defined function (see 2737 or user defined function (see
2738 |user-functions|). 2738 |user-functions|). Also works for a
2739 variable that is a Funcref.
2739 varname internal variable (see 2740 varname internal variable (see
2740 |internal-variables|). Also works 2741 |internal-variables|). Also works
2741 for |curly-braces-names|, |Dictionary| 2742 for |curly-braces-names|, |Dictionary|
2742 entries, |List| items, etc. Beware 2743 entries, |List| items, etc. Beware
2743 that evaluating an index may cause an 2744 that evaluating an index may cause an
6462 :if v:version > 602 || v:version == 602 && has("patch148") 6463 :if v:version > 602 || v:version == 602 && has("patch148")
6463 < Note that it's possible for patch 147 to be omitted even though 148 is 6464 < Note that it's possible for patch 147 to be omitted even though 148 is
6464 included. 6465 included.
6465 6466
6466 4. Beyond a certain version or at a certain version and including a specific 6467 4. Beyond a certain version or at a certain version and including a specific
6467 patch. The "patch-7.4.123" feature means that the Vim version is 7.5 or 6468 patch. The "patch-7.4.237" feature means that the Vim version is 7.5 or
6468 later, or it is version 7.4 and patch 123 was included. 6469 later, or it is version 7.4 and patch 237 was included.
6469 The example above can be simplified to: > 6470 Note that this only works for patch 7.4.237 and later, before that you
6470 :if has("patch-6.2.148") 6471 need to use the example above that checks v:version. Example: >
6472 :if has("patch-7.4.248")
6471 < Note that it's possible for patch 147 to be omitted even though 148 is 6473 < Note that it's possible for patch 147 to be omitted even though 148 is
6472 included. 6474 included.
6473 6475
6474 acl Compiled with |ACL| support. 6476 acl Compiled with |ACL| support.
6475 all_builtin_terms Compiled with all builtin terminals enabled. 6477 all_builtin_terms Compiled with all builtin terminals enabled.
6688 A function local to a script must start with "s:". A local script function 6690 A function local to a script must start with "s:". A local script function
6689 can only be called from within the script and from functions, user commands 6691 can only be called from within the script and from functions, user commands
6690 and autocommands defined in the script. It is also possible to call the 6692 and autocommands defined in the script. It is also possible to call the
6691 function from a mapping defined in the script, but then |<SID>| must be used 6693 function from a mapping defined in the script, but then |<SID>| must be used
6692 instead of "s:" when the mapping is expanded outside of the script. 6694 instead of "s:" when the mapping is expanded outside of the script.
6695 There are only script-local functions, no buffer-local or window-local
6696 functions.
6693 6697
6694 *:fu* *:function* *E128* *E129* *E123* 6698 *:fu* *:function* *E128* *E129* *E123*
6695 :fu[nction] List all functions and their arguments. 6699 :fu[nction] List all functions and their arguments.
6696 6700
6697 :fu[nction] {name} List function {name}. 6701 :fu[nction] {name} List function {name}.
6711 function SetFileTypeSH(name) 6715 function SetFileTypeSH(name)
6712 Last set from /usr/share/vim/vim-7.0/filetype.vim 6716 Last set from /usr/share/vim/vim-7.0/filetype.vim
6713 < 6717 <
6714 See |:verbose-cmd| for more information. 6718 See |:verbose-cmd| for more information.
6715 6719
6716 *E124* *E125* *E853* 6720 *E124* *E125* *E853* *E884*
6717 :fu[nction][!] {name}([arguments]) [range] [abort] [dict] 6721 :fu[nction][!] {name}([arguments]) [range] [abort] [dict]
6718 Define a new function by the name {name}. The name 6722 Define a new function by the name {name}. The name
6719 must be made of alphanumeric characters and '_', and 6723 must be made of alphanumeric characters and '_', and
6720 must start with a capital or "s:" (see above). When 6724 must start with a capital or "s:" (see above). Note
6721 using a capital "g:" be prepended. 6725 that using "b:" or "g:" is not allowed. (since patch
6726 7.4.260 E884 is given if the function name has a colon
6727 in the name, e.g. for "foo:bar()". Before that patch
6728 no error was given).
6722 6729
6723 {name} can also be a |Dictionary| entry that is a 6730 {name} can also be a |Dictionary| entry that is a
6724 |Funcref|: > 6731 |Funcref|: >
6725 :function dict.init(arg) 6732 :function dict.init(arg)
6726 < "dict" must be an existing dictionary. The entry 6733 < "dict" must be an existing dictionary. The entry