Mercurial > vim
comparison runtime/doc/eval.txt @ 18031:8a2fb21c23c0 v8.1.2011
patch 8.1.2011: more functions can be used as methods
Commit: https://github.com/vim/vim/commit/ce90e36f5969e733a0a919f1736453332c33aad6
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Sep 8 18:58:44 2019 +0200
patch 8.1.2011: more functions can be used as methods
Problem: More functions can be used as methods.
Solution: Make various functions usable as a method. Make the window
command test faster.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 08 Sep 2019 19:00:04 +0200 |
parents | 988e5a868b60 |
children | 11dca9732a48 |
comparison
equal
deleted
inserted
replaced
18030:e7a81e948c12 | 18031:8a2fb21c23c0 |
---|---|
9604 for i in range(tabpagenr('$')) | 9604 for i in range(tabpagenr('$')) |
9605 call extend(buflist, tabpagebuflist(i + 1)) | 9605 call extend(buflist, tabpagebuflist(i + 1)) |
9606 endfor | 9606 endfor |
9607 < Note that a buffer may appear in more than one window. | 9607 < Note that a buffer may appear in more than one window. |
9608 | 9608 |
9609 Can also be used as a |method|: > | |
9610 GetTabpage()->tabpagebuflist() | |
9609 | 9611 |
9610 tabpagenr([{arg}]) *tabpagenr()* | 9612 tabpagenr([{arg}]) *tabpagenr()* |
9611 The result is a Number, which is the number of the current | 9613 The result is a Number, which is the number of the current |
9612 tab page. The first tab page has number 1. | 9614 tab page. The first tab page has number 1. |
9613 When the optional argument is "$", the number of the last tab | 9615 When the optional argument is "$", the number of the last tab |
9626 Useful examples: > | 9628 Useful examples: > |
9627 tabpagewinnr(1) " current window of tab page 1 | 9629 tabpagewinnr(1) " current window of tab page 1 |
9628 tabpagewinnr(4, '$') " number of windows in tab page 4 | 9630 tabpagewinnr(4, '$') " number of windows in tab page 4 |
9629 < When {tabarg} is invalid zero is returned. | 9631 < When {tabarg} is invalid zero is returned. |
9630 | 9632 |
9633 Can also be used as a |method|: > | |
9634 GetTabpage()->tabpagewinnr() | |
9635 < | |
9631 *tagfiles()* | 9636 *tagfiles()* |
9632 tagfiles() Returns a |List| with the file names used to search for tags | 9637 tagfiles() Returns a |List| with the file names used to search for tags |
9633 for the current buffer. This is the 'tags' option expanded. | 9638 for the current buffer. This is the 'tags' option expanded. |
9634 | 9639 |
9635 | 9640 |
9673 search regular expression pattern. | 9678 search regular expression pattern. |
9674 | 9679 |
9675 Refer to |'tags'| for information about how the tags file is | 9680 Refer to |'tags'| for information about how the tags file is |
9676 located by Vim. Refer to |tags-file-format| for the format of | 9681 located by Vim. Refer to |tags-file-format| for the format of |
9677 the tags file generated by the different ctags tools. | 9682 the tags file generated by the different ctags tools. |
9683 | |
9684 Can also be used as a |method|: > | |
9685 GetTagpattern()->taglist() | |
9678 | 9686 |
9679 tan({expr}) *tan()* | 9687 tan({expr}) *tan()* |
9680 Return the tangent of {expr}, measured in radians, as a |Float| | 9688 Return the tangent of {expr}, measured in radians, as a |Float| |
9681 in the range [-inf, inf]. | 9689 in the range [-inf, inf]. |
9682 {expr} must evaluate to a |Float| or a |Number|. | 9690 {expr} must evaluate to a |Float| or a |Number|. |