Mercurial > vim
comparison runtime/doc/eval.txt @ 464:3b705e71c7b0 v7.0124
updated for version 7.0124
author | vimboss |
---|---|
date | Fri, 05 Aug 2005 21:35:02 +0000 |
parents | d9d38102399f |
children | f8b75b8f1988 |
comparison
equal
deleted
inserted
replaced
463:8411e13e6dcb | 464:3b705e71c7b0 |
---|---|
1 *eval.txt* For Vim version 7.0aa. Last change: 2005 Aug 01 | 1 *eval.txt* For Vim version 7.0aa. Last change: 2005 Aug 05 |
2 | 2 |
3 | 3 |
4 VIM REFERENCE MANUAL by Bram Moolenaar | 4 VIM REFERENCE MANUAL by Bram Moolenaar |
5 | 5 |
6 | 6 |
1472 call( {func}, {arglist} [, {dict}]) | 1472 call( {func}, {arglist} [, {dict}]) |
1473 any call {func} with arguments {arglist} | 1473 any call {func} with arguments {arglist} |
1474 char2nr( {expr}) Number ASCII value of first char in {expr} | 1474 char2nr( {expr}) Number ASCII value of first char in {expr} |
1475 cindent( {lnum}) Number C indent for line {lnum} | 1475 cindent( {lnum}) Number C indent for line {lnum} |
1476 col( {expr}) Number column nr of cursor or mark | 1476 col( {expr}) Number column nr of cursor or mark |
1477 complete_add( {expr}) Number add completion match | |
1478 complete_check() Number check for key typed during completion | |
1477 confirm( {msg} [, {choices} [, {default} [, {type}]]]) | 1479 confirm( {msg} [, {choices} [, {default} [, {type}]]]) |
1478 Number number of choice picked by user | 1480 Number number of choice picked by user |
1479 copy( {expr}) any make a shallow copy of {expr} | 1481 copy( {expr}) any make a shallow copy of {expr} |
1480 count( {list}, {expr} [, {start} [, {ic}]]) | 1482 count( {list}, {expr} [, {start} [, {ic}]]) |
1481 Number count how many {expr} are in {list} | 1483 Number count how many {expr} are in {list} |
1884 :imap <F2> <C-O>:let save_ve = &ve<CR> | 1886 :imap <F2> <C-O>:let save_ve = &ve<CR> |
1885 \<C-O>:set ve=all<CR> | 1887 \<C-O>:set ve=all<CR> |
1886 \<C-O>:echo col(".") . "\n" <Bar> | 1888 \<C-O>:echo col(".") . "\n" <Bar> |
1887 \let &ve = save_ve<CR> | 1889 \let &ve = save_ve<CR> |
1888 < | 1890 < |
1891 | |
1892 complete_add({expr}) *complete_add()* | |
1893 Add {expr} to the list of matches. Only to be used by the | |
1894 function specified with the 'completefunc' option. | |
1895 Returns 0 for failure (empty string or out of memory), | |
1896 1 when the match was added, 2 when the match was already in | |
1897 the list. | |
1898 | |
1899 complete_check() *complete_check()* | |
1900 Check for a key typed while looking for completion matches. | |
1901 This is to be used when looking for matches takes some time. | |
1902 Returns non-zero when searching for matches is to be aborted, | |
1903 zero otherwise. | |
1904 Only to be used by the function specified with the | |
1905 'completefunc' option. | |
1906 | |
1889 *confirm()* | 1907 *confirm()* |
1890 confirm({msg} [, {choices} [, {default} [, {type}]]]) | 1908 confirm({msg} [, {choices} [, {default} [, {type}]]]) |
1891 Confirm() offers the user a dialog, from which a choice can be | 1909 Confirm() offers the user a dialog, from which a choice can be |
1892 made. It returns the number of the choice. For the first | 1910 made. It returns the number of the choice. For the first |
1893 choice this is 1. | 1911 choice this is 1. |
5231 Repeat the commands between ":for" and ":endfor" for | 5249 Repeat the commands between ":for" and ":endfor" for |
5232 each item in {list}. Variable {var} is set to the | 5250 each item in {list}. Variable {var} is set to the |
5233 value of each item. | 5251 value of each item. |
5234 When an error is detected for a command inside the | 5252 When an error is detected for a command inside the |
5235 loop, execution continues after the "endfor". | 5253 loop, execution continues after the "endfor". |
5236 Changing {list} affects what items are used. Make a | 5254 Changing {list} inside the loop affects what items are |
5237 copy if this is unwanted: > | 5255 used. Make a copy if this is unwanted: > |
5238 :for item in copy(mylist) | 5256 :for item in copy(mylist) |
5239 < When not making a copy, Vim stores a reference to the | 5257 < When not making a copy, Vim stores a reference to the |
5240 next item in the list, before executing the commands | 5258 next item in the list, before executing the commands |
5241 with the current item. Thus the current item can be | 5259 with the current item. Thus the current item can be |
5242 removed without effect. Removing any later item means | 5260 removed without effect. Removing any later item means |
5249 reverse()) may have unexpected effects. | 5267 reverse()) may have unexpected effects. |
5250 Note that the type of each list item should be | 5268 Note that the type of each list item should be |
5251 identical to avoid errors for the type of {var} | 5269 identical to avoid errors for the type of {var} |
5252 changing. Unlet the variable at the end of the loop | 5270 changing. Unlet the variable at the end of the loop |
5253 to allow multiple item types. | 5271 to allow multiple item types. |
5254 | |
5255 :for {var} in {string} | |
5256 :endfo[r] Like ":for" above, but use each character in {string} | |
5257 as a list item. | |
5258 Composing characters are used as separate characters. | |
5259 A Number is first converted to a String. | |
5260 | 5272 |
5261 :for [{var1}, {var2}, ...] in {listlist} | 5273 :for [{var1}, {var2}, ...] in {listlist} |
5262 :endfo[r] | 5274 :endfo[r] |
5263 Like ":for" above, but each item in {listlist} must be | 5275 Like ":for" above, but each item in {listlist} must be |
5264 a list, of which each item is assigned to {var1}, | 5276 a list, of which each item is assigned to {var1}, |