Skip to content

Commit a11b9b4

Browse files
authored
Merge pull request #1331 from vim-jp/hh-update-userfunc
Update userfunc.{txt,jax}
2 parents f774d44 + dc887cf commit a11b9b4

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

doc/userfunc.jax

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*userfunc.txt* For Vim バージョン 9.0. Last change: 2023 Feb 02
1+
*userfunc.txt* For Vim バージョン 9.0. Last change: 2023 May 23
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -51,6 +51,12 @@
5151
{name}は辞書|Dictionary|の要素の|Funcref|であってもよ
5252
い: >
5353
:function dict.init
54+
< Note {name} は式ではないため、関数参照である変数は使用
55+
できないことに注意。この汚いトリックを使用すると、変数
56+
"Funcref" で参照される関数をリストできる: >
57+
let g:MyFuncref = Funcref
58+
func g:MyFuncref
59+
unlet g:MyFuncref
5460
5561
:fu[nction] /{pattern} {pattern}にマッチする名前の関数を表示する。"File" で終
5662
わる関数を全て表示する例: >

en/userfunc.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*userfunc.txt* For Vim version 9.0. Last change: 2023 Feb 02
1+
*userfunc.txt* For Vim version 9.0. Last change: 2023 May 23
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -51,6 +51,13 @@ define a global function.
5151
{name} can also be a |Dictionary| entry that is a
5252
|Funcref|: >
5353
:function dict.init
54+
< Note that {name} is not an expression, you cannot use
55+
a variable that is a function reference. You can use
56+
this dirty trick to list the function referred to with
57+
variable "Funcref": >
58+
let g:MyFuncref = Funcref
59+
func g:MyFuncref
60+
unlet g:MyFuncref
5461
5562
:fu[nction] /{pattern} List functions with a name matching {pattern}.
5663
Example that lists all functions ending with "File": >

0 commit comments

Comments
 (0)