@@ -1228,7 +1228,7 @@ next method: >
12281228 mylist->filter(filterexpr)->map(mapexpr)->sort()->join()
12291229<
12301230Example of using a lambda: >
1231- GetPercentage->{x -> x * 100}()->printf('%d%%')
1231+ GetPercentage() ->{x -> x * 100}()->printf('%d%%')
12321232<
12331233When using -> the | expr7 | operators will be applied first, thus: >
12341234 -1.234->string()
@@ -6206,6 +6206,9 @@ js_decode({string}) *js_decode()*
62066206 - Empty items in an array (between two commas) are allowed and
62076207 result in v:none items.
62086208
6209+ Can also be used as a | method | : >
6210+ ReadObject()->js_decode()
6211+
62096212 js_encode({expr} ) *js_encode()*
62106213 This is similar to | json_encode() | with these differences:
62116214 - Object key names are not in quotes.
@@ -6220,6 +6223,8 @@ js_encode({expr}) *js_encode()*
62206223 This encoding is valid for JavaScript. It is more efficient
62216224 than JSON, especially when using an array with optional items.
62226225
6226+ Can also be used as a | method | : >
6227+ GetObject()->js_encode()
62236228
62246229 json_decode({string} ) *json_decode()*
62256230 This parses a JSON formatted string and returns the equivalent
@@ -6254,6 +6259,8 @@ json_decode({string}) *json_decode()*
62546259 accepted by json_decode() as the result must be a valid Vim
62556260 type, e.g. this fails: {"a":"b", "a":"c"}
62566261
6262+ Can also be used as a | method | : >
6263+ ReadObject()->json_decode()
62576264
62586265 json_encode({expr} ) *json_encode()*
62596266 Encode {expr} as JSON and return this as a string.
@@ -6280,6 +6287,9 @@ json_encode({expr}) *json_encode()*
62806287 missing in the JSON standard, but several implementations do
62816288 allow it. If not then you will get an error.
62826289
6290+ Can also be used as a | method | : >
6291+ GetObject()->json_encode()
6292+
62836293 keys({dict} ) *keys()*
62846294 Return a | List | with all the keys of {dict} . The | List | is in
62856295 arbitrary order. Also see | items() | and | values() | .
@@ -6346,6 +6356,10 @@ libcall({libname}, {funcname}, {argument})
63466356 feature is present}
63476357 Examples: >
63486358 :echo libcall("libc.so", "getenv", "HOME")
6359+
6360+ < Can also be used as a | method | , where the base is passed as
6361+ the argument to the called function: >
6362+ GetValue()->libcall("libc.so", "getenv")
63496363<
63506364 *libcallnr()*
63516365libcallnr({libname} , {funcname} , {argument} )
@@ -6357,6 +6371,10 @@ libcallnr({libname}, {funcname}, {argument})
63576371 :echo libcallnr("/usr/lib/libc.so", "getpid", "")
63586372 :call libcallnr("libc.so", "printf", "Hello World!\n")
63596373 :call libcallnr("libc.so", "sleep", 10)
6374+ <
6375+ Can also be used as a | method | , where the base is passed as
6376+ the argument to the called function: >
6377+ GetValue()->libcallnr("libc.so", "printf")
63606378<
63616379 *line()*
63626380line({expr} ) The result is a Number, which is the line number of the file
@@ -6385,6 +6403,9 @@ line({expr}) The result is a Number, which is the line number of the file
63856403 To jump to the last known position when opening a file see
63866404 | last-position-jump | .
63876405
6406+ Can also be used as a | method | : >
6407+ GetValue()->line()
6408+
63886409 line2byte({lnum} ) *line2byte()*
63896410 Return the byte count from the start of the buffer for line
63906411 {lnum} . This includes the end-of-line character, depending on
@@ -6399,6 +6420,9 @@ line2byte({lnum}) *line2byte()*
63996420 disabled at compile time, -1 is returned.
64006421 Also see | byte2line() | , | go | and | :goto | .
64016422
6423+ Can also be used as a | method | : >
6424+ GetLnum()->line2byte()
6425+
64026426 lispindent({lnum} ) *lispindent()*
64036427 Get the amount of indent for line {lnum} according the lisp
64046428 indenting rules, as with 'lisp' .
@@ -6407,6 +6431,9 @@ lispindent({lnum}) *lispindent()*
64076431 When {lnum} is invalid or Vim was not compiled the
64086432 | +lispindent | feature, -1 is returned.
64096433
6434+ Can also be used as a | method | : >
6435+ GetLnum()->lispindent()
6436+
64106437 list2str({list} [, {utf8} ]) *list2str()*
64116438 Convert each number in {list} to a character string can
64126439 concatenate them all. Examples: >
@@ -6421,6 +6448,9 @@ list2str({list} [, {utf8}]) *list2str()*
64216448 With utf-8 composing characters work as expected: >
64226449 list2str([97, 769]) returns "á"
64236450<
6451+ Can also be used as a | method | : >
6452+ GetList()->list2str()
6453+
64246454 listener_add({callback} [, {buf} ]) *listener_add()*
64256455 Add a callback function that will be invoked when changes have
64266456 been made to buffer {buf} .
@@ -6490,6 +6520,10 @@ listener_add({callback} [, {buf}]) *listener_add()*
64906520 The {callback} is also not invoked when the buffer is
64916521 unloaded, use the | BufUnload | autocmd event for that.
64926522
6523+ Can also be used as a | method | , where the base is passed as
6524+ the second argument, the buffer: >
6525+ GetBuffer()->listener_add(callback)
6526+
64936527 listener_flush([{buf} ]) *listener_flush()*
64946528 Invoke listener callbacks for buffer {buf} . If there are no
64956529 pending changes then no callbacks are invoked.
@@ -6498,11 +6532,17 @@ listener_flush([{buf}]) *listener_flush()*
64986532 values, see | bufname() | . When {buf} is omitted the current
64996533 buffer is used.
65006534
6535+ Can also be used as a | method | : >
6536+ GetBuffer()->listener_flush()
6537+
65016538 listener_remove({id} ) *listener_remove()*
65026539 Remove a listener previously added with listener_add().
65036540 Returns zero when {id} could not be found, one when {id} was
65046541 removed.
65056542
6543+ Can also be used as a | method | : >
6544+ GetListenerId()->listener_remove()
6545+
65066546 localtime() *localtime()*
65076547 Return the current time, measured as seconds since 1st Jan
65086548 1970. See also | strftime() | and | getftime() | .
@@ -6550,7 +6590,11 @@ luaeval({expr} [, {expr}]) *luaeval()*
65506590 as-is.
65516591 Other objects are returned as zero without any errors.
65526592 See | lua-luaeval | for more details.
6553- {only available when compiled with the | +lua | feature}
6593+
6594+ Can also be used as a | method | : >
6595+ GetExpr()->luaeval()
6596+
6597+ < {only available when compiled with the | +lua | feature}
65546598
65556599map({expr1} , {expr2} ) *map()*
65566600 {expr1} must be a | List | or a | Dictionary | .
0 commit comments