Mercurial > vim
comparison runtime/doc/eval.txt @ 3445:2cfb68fa26cd
Updated runtime files.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 28 Mar 2012 20:51:51 +0200 |
parents | 94601b379f38 |
children | 4dde9b516e72 |
comparison
equal
deleted
inserted
replaced
3444:501b864811d0 | 3445:2cfb68fa26cd |
---|---|
1 *eval.txt* For Vim version 7.3. Last change: 2012 Mar 07 | 1 *eval.txt* For Vim version 7.3. Last change: 2012 Mar 28 |
2 | 2 |
3 | 3 |
4 VIM REFERENCE MANUAL by Bram Moolenaar | 4 VIM REFERENCE MANUAL by Bram Moolenaar |
5 | 5 |
6 | 6 |
3471 you also get filenames containing newlines correctly. | 3471 you also get filenames containing newlines correctly. |
3472 Otherwise the result is a String and when there are several | 3472 Otherwise the result is a String and when there are several |
3473 matches, they are separated by <NL> characters. | 3473 matches, they are separated by <NL> characters. |
3474 | 3474 |
3475 If the expansion fails, the result is an empty String or List. | 3475 If the expansion fails, the result is an empty String or List. |
3476 A name for a non-existing file is not included. | 3476 A name for a non-existing file is not included. A symbolic |
3477 link is only included if it points to an existing file. | |
3477 | 3478 |
3478 For most systems backticks can be used to get files names from | 3479 For most systems backticks can be used to get files names from |
3479 any external command. Example: > | 3480 any external command. Example: > |
3480 :let tagfiles = glob("`find . -name tags -print`") | 3481 :let tagfiles = glob("`find . -name tags -print`") |
3481 :let &tags = substitute(tagfiles, "\n", ",", "g") | 3482 :let &tags = substitute(tagfiles, "\n", ",", "g") |
5777 buffer associated with each window in the current tab page. | 5778 buffer associated with each window in the current tab page. |
5778 {arg} specifies the number of tab page to be used. When | 5779 {arg} specifies the number of tab page to be used. When |
5779 omitted the current tab page is used. | 5780 omitted the current tab page is used. |
5780 When {arg} is invalid the number zero is returned. | 5781 When {arg} is invalid the number zero is returned. |
5781 To get a list of all buffers in all tabs use this: > | 5782 To get a list of all buffers in all tabs use this: > |
5782 tablist = [] | 5783 let buflist = [] |
5783 for i in range(tabpagenr('$')) | 5784 for i in range(tabpagenr('$')) |
5784 call extend(tablist, tabpagebuflist(i + 1)) | 5785 call extend(buflist, tabpagebuflist(i + 1)) |
5785 endfor | 5786 endfor |
5786 < Note that a buffer may appear in more than one window. | 5787 < Note that a buffer may appear in more than one window. |
5787 | 5788 |
5788 | 5789 |
5789 tabpagenr([{arg}]) *tabpagenr()* | 5790 tabpagenr([{arg}]) *tabpagenr()* |
6001 position given with {expr}. That is, the last screen position | 6002 position given with {expr}. That is, the last screen position |
6002 occupied by the character at that position, when the screen | 6003 occupied by the character at that position, when the screen |
6003 would be of unlimited width. When there is a <Tab> at the | 6004 would be of unlimited width. When there is a <Tab> at the |
6004 position, the returned Number will be the column at the end of | 6005 position, the returned Number will be the column at the end of |
6005 the <Tab>. For example, for a <Tab> in column 1, with 'ts' | 6006 the <Tab>. For example, for a <Tab> in column 1, with 'ts' |
6006 set to 8, it returns 8. | 6007 set to 8, it returns 8. |conceal| is ignored. |
6007 For the byte position use |col()|. | 6008 For the byte position use |col()|. |
6008 For the use of {expr} see |col()|. | 6009 For the use of {expr} see |col()|. |
6009 When 'virtualedit' is used {expr} can be [lnum, col, off], where | 6010 When 'virtualedit' is used {expr} can be [lnum, col, off], where |
6010 "off" is the offset in screen columns from the start of the | 6011 "off" is the offset in screen columns from the start of the |
6011 character. E.g., a position within a <Tab> or after the last | 6012 character. E.g., a position within a <Tab> or after the last |