1
0
forked from aniani/vim

patch 8.1.1952: more functions can be used as a method

Problem:    More functions can be used as a method.
Solution:   Allow more functions to be used as a method.
This commit is contained in:
Bram Moolenaar
2019-08-31 19:13:58 +02:00
parent f1699968ba
commit 5d69fdb7c4
9 changed files with 44 additions and 17 deletions

View File

@@ -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