diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-08-31 19:13:58 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-08-31 19:13:58 +0200 |
commit | 5d69fdb7c4b91faf2d92b8d449cc9460f3035fb3 (patch) | |
tree | 384a1f061d6dd2822e83adeff2f140191ed2f6de /runtime/doc | |
parent | f1699968baf3619a4147b44c891ba4a0985e7656 (diff) | |
download | vim-git-5d69fdb7c4b91faf2d92b8d449cc9460f3035fb3.tar.gz |
patch 8.1.1952: more functions can be used as a methodv8.1.1952
Problem: More functions can be used as a method.
Solution: Allow more functions to be used as a method.
Diffstat (limited to 'runtime/doc')
-rw-r--r-- | runtime/doc/eval.txt | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index e33f4e15d..1c792e27a 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 8.1. Last change: 2019 Aug 28 +*eval.txt* For Vim version 8.1. Last change: 2019 Aug 31 VIM REFERENCE MANUAL by Bram Moolenaar @@ -5517,7 +5517,7 @@ gettabwinvar({tabnr}, {winnr}, {varname} [, {def}]) *gettabwinvar()* gettabwinvar({tabnr}, {winnr}, '&') < Can also be used as a |method|: > - GetTabnr()->gettabvar(winnr, varname) + GetTabnr()->gettabwinvar(winnr, varname) gettagstack([{nr}]) *gettagstack()* The result is a Dict, which is the tag stack of window {nr}. @@ -5547,6 +5547,9 @@ gettagstack([{nr}]) *gettagstack()* See |tagstack| for more information about the tag stack. + Can also be used as a |method|: > + GetWinnr()->gettagstack() + getwininfo([{winid}]) *getwininfo()* Returns information about windows as a List with Dictionaries. @@ -5581,6 +5584,9 @@ getwininfo([{winid}]) *getwininfo()* winrow topmost screen column of the window, row from |win_screenpos()| + Can also be used as a |method|: > + GetWinnr()->getwininfo() + getwinpos([{timeout}]) *getwinpos()* The result is a list with two numbers, the result of getwinposx() and getwinposy() combined: @@ -5600,6 +5606,10 @@ getwinpos([{timeout}]) *getwinpos()* " Do some work here endwhile < + + Can also be used as a |method|: > + GetTimeout()->getwinpos() +< *getwinposx()* getwinposx() The result is a Number, which is the X coordinate in pixels of the left hand side of the GUI Vim window. Also works for an @@ -5619,6 +5629,9 @@ getwinvar({winnr}, {varname} [, {def}]) *getwinvar()* Examples: > :let list_is_on = getwinvar(2, '&list') :echo "myvar = " . getwinvar(1, 'myvar') + +< Can also be used as a |method|: > + GetWinnr()->getwinvar(varname) < glob({expr} [, {nosuf} [, {list} [, {alllinks}]]]) *glob()* Expand the file wildcards in {expr}. See |wildcards| for the @@ -5656,6 +5669,9 @@ glob({expr} [, {nosuf} [, {list} [, {alllinks}]]]) *glob()* See |expand()| for expanding special Vim variables. See |system()| for getting the raw output of an external command. + Can also be used as a |method|: > + GetExpr()->glob() + glob2regpat({expr}) *glob2regpat()* Convert a file pattern, as used by glob(), into a search pattern. The result can be used to match with a string that @@ -5668,7 +5684,9 @@ glob2regpat({expr}) *glob2regpat()* Note that the result depends on the system. On MS-Windows a backslash usually means a path separator. - *globpath()* + Can also be used as a |method|: > + GetExpr()->glob2regpat() +< *globpath()* globpath({path}, {expr} [, {nosuf} [, {list} [, {alllinks}]]]) Perform glob() on all directories in {path} and concatenate the results. Example: > @@ -5704,6 +5722,10 @@ globpath({path}, {expr} [, {nosuf} [, {list} [, {alllinks}]]]) < Upwards search and limiting the depth of "**" is not supported, thus using 'path' will not always work properly. + Can also be used as a |method|, the base is passed as the + second argument: > + GetExpr()->globpath(&rtp) +< *has()* has({feature}) The result is a Number, which is 1 if the feature {feature} is supported, zero otherwise. The {feature} argument is a |