Mercurial > vim
comparison runtime/doc/eval.txt @ 2662:916c90b37ea9
Update runtime files.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Fri, 10 Dec 2010 20:35:50 +0100 |
parents | 840c3cadb842 |
children | 85c5a72551e2 |
comparison
equal
deleted
inserted
replaced
2661:a03f7551bacc | 2662:916c90b37ea9 |
---|---|
1 *eval.txt* For Vim version 7.3. Last change: 2010 Nov 13 | 1 *eval.txt* For Vim version 7.3. Last change: 2010 Dec 01 |
2 | 2 |
3 | 3 |
4 VIM REFERENCE MANUAL by Bram Moolenaar | 4 VIM REFERENCE MANUAL by Bram Moolenaar |
5 | 5 |
6 | 6 |
2718 {only available when compiled with the |+float| feature} | 2718 {only available when compiled with the |+float| feature} |
2719 | 2719 |
2720 | 2720 |
2721 expand({expr} [, {flag}]) *expand()* | 2721 expand({expr} [, {flag}]) *expand()* |
2722 Expand wildcards and the following special keywords in {expr}. | 2722 Expand wildcards and the following special keywords in {expr}. |
2723 The result is a String. | 2723 The result is a String. 'wildignorecase' applies. |
2724 | 2724 |
2725 When there are several matches, they are separated by <NL> | 2725 When there are several matches, they are separated by <NL> |
2726 characters. [Note: in version 5.0 a space was used, which | 2726 characters. [Note: in version 5.0 a space was used, which |
2727 caused problems when a file name contains a space] | 2727 caused problems when a file name contains a space] |
2728 | 2728 |
2739 <cfile> file name under the cursor | 2739 <cfile> file name under the cursor |
2740 <afile> autocmd file name | 2740 <afile> autocmd file name |
2741 <abuf> autocmd buffer number (as a String!) | 2741 <abuf> autocmd buffer number (as a String!) |
2742 <amatch> autocmd matched name | 2742 <amatch> autocmd matched name |
2743 <sfile> sourced script file name | 2743 <sfile> sourced script file name |
2744 <slnum> sourced script file line number | |
2744 <cword> word under the cursor | 2745 <cword> word under the cursor |
2745 <cWORD> WORD under the cursor | 2746 <cWORD> WORD under the cursor |
2746 <client> the {clientid} of the last received | 2747 <client> the {clientid} of the last received |
2747 message |server2client()| | 2748 message |server2client()| |
2748 Modifiers: | 2749 Modifiers: |
3432 characters. | 3433 characters. |
3433 Unless the optional {flag} argument is given and is non-zero, | 3434 Unless the optional {flag} argument is given and is non-zero, |
3434 the 'suffixes' and 'wildignore' options apply: Names matching | 3435 the 'suffixes' and 'wildignore' options apply: Names matching |
3435 one of the patterns in 'wildignore' will be skipped and | 3436 one of the patterns in 'wildignore' will be skipped and |
3436 'suffixes' affect the ordering of matches. | 3437 'suffixes' affect the ordering of matches. |
3438 'wildignorecase' always applies. | |
3437 If the expansion fails, the result is an empty string. | 3439 If the expansion fails, the result is an empty string. |
3438 A name for a non-existing file is not included. | 3440 A name for a non-existing file is not included. |
3439 | 3441 |
3440 For most systems backticks can be used to get files names from | 3442 For most systems backticks can be used to get files names from |
3441 any external command. Example: > | 3443 any external command. Example: > |
5452 stridx({haystack}, {needle} [, {start}]) *stridx()* | 5454 stridx({haystack}, {needle} [, {start}]) *stridx()* |
5453 The result is a Number, which gives the byte index in | 5455 The result is a Number, which gives the byte index in |
5454 {haystack} of the first occurrence of the String {needle}. | 5456 {haystack} of the first occurrence of the String {needle}. |
5455 If {start} is specified, the search starts at index {start}. | 5457 If {start} is specified, the search starts at index {start}. |
5456 This can be used to find a second match: > | 5458 This can be used to find a second match: > |
5457 :let comma1 = stridx(line, ",") | 5459 :let colon1 = stridx(line, ":") |
5458 :let comma2 = stridx(line, ",", comma1 + 1) | 5460 :let colon2 = stridx(line, ":", colon1 + 1) |
5459 < The search is done case-sensitive. | 5461 < The search is done case-sensitive. |
5460 For pattern searches use |match()|. | 5462 For pattern searches use |match()|. |
5461 -1 is returned if the {needle} does not occur in {haystack}. | 5463 -1 is returned if the {needle} does not occur in {haystack}. |
5462 See also |strridx()|. | 5464 See also |strridx()|. |
5463 Examples: > | 5465 Examples: > |