diff runtime/doc/eval.txt @ 17829:1090d6637cfd v8.1.1911

patch 8.1.1911: more functions can be used as methods Commit: https://github.com/vim/vim/commit/64b4d73524b9a2304d89b87529cd8d3cef14b856 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Aug 22 22:18:17 2019 +0200 patch 8.1.1911: more functions can be used as methods Problem: More functions can be used as methods. Solution: Make a few more functions usable as a method.
author Bram Moolenaar <Bram@vim.org>
date Thu, 22 Aug 2019 22:30:04 +0200
parents ce993ba17adb
children 8377ec7c5824
line wrap: on
line diff
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -3299,7 +3299,11 @@ byte2line({byte})					*byte2line()*
 		for the current buffer.  The first character has byte count
 		one.
 		Also see |line2byte()|, |go| and |:goto|.
-		{not available when compiled without the |+byte_offset|
+
+		Can also be used as a |method|: >
+			GetOffset()->byte2line()
+
+<		{not available when compiled without the |+byte_offset|
 		feature}
 
 byteidx({expr}, {nr})					*byteidx()*
@@ -3323,6 +3327,9 @@ byteidx({expr}, {nr})					*byteidx()*
 		If there are exactly {nr} characters the length of the string
 		in bytes is returned.
 
+		Can also be used as a |method|: >
+			GetName()->byteidx(idx)
+
 byteidxcomp({expr}, {nr})					*byteidxcomp()*
 		Like byteidx(), except that a composing character is counted
 		as a separate character.  Example: >
@@ -3336,6 +3343,9 @@ byteidxcomp({expr}, {nr})					*byteidxco
 		Only works different from byteidx() when 'encoding' is set to
 		a Unicode encoding.
 
+		Can also be used as a |method|: >
+			GetName()->byteidxcomp(idx)
+
 call({func}, {arglist} [, {dict}])			*call()* *E699*
 		Call function {func} with the items in |List| {arglist} as
 		arguments.
@@ -3345,6 +3355,9 @@ call({func}, {arglist} [, {dict}])			*ca
 		{dict} is for functions with the "dict" attribute.  It will be
 		used to set the local variable "self". |Dictionary-function|
 
+		Can also be used as a |method|: >
+			GetFunc()->call([arg, arg], dict)
+
 ceil({expr})							*ceil()*
 		Return the smallest integral value greater than or equal to
 		{expr} as a |Float| (round up).