aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorSean Dewar <seandewar@users.noreply.github.com>2021-08-07 22:39:23 +0100
committerSean Dewar <seandewar@users.noreply.github.com>2021-08-12 22:35:25 +0100
commit5d883498179651c6da95b10959e83cf8707eaa4f (patch)
tree1e0019000c1a2cb9af8895c38aaeb49a94d96823 /runtime
parent56b56a76e8294a319d2db32581f82421d4a4d446 (diff)
downloadrneovim-5d883498179651c6da95b10959e83cf8707eaa4f.tar.gz
rneovim-5d883498179651c6da95b10959e83cf8707eaa4f.tar.bz2
rneovim-5d883498179651c6da95b10959e83cf8707eaa4f.zip
feat(eval): partially port v8.1.1915
Cannot be fully ported as chdir() hasn't been ported yet.
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt45
1 files changed, 45 insertions, 0 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 5cf0c0d239..f70eb9e759 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -3074,6 +3074,9 @@ char2nr({expr} [, {utf8}]) *char2nr()*
A combining character is a separate character.
|nr2char()| does the opposite.
+ Can also be used as a |method|: >
+ GetChar()->char2nr()
+
*charidx()*
charidx({string}, {idx} [, {countcc}])
Return the character index of the byte at {idx} in {string}.
@@ -3105,12 +3108,18 @@ cindent({lnum}) *cindent()*
When {lnum} is invalid -1 is returned.
See |C-indenting|.
+ Can also be used as a |method|: >
+ GetLnum()->cindent()
+
clearmatches([{win}]) *clearmatches()*
Clears all matches previously defined for the current window
by |matchadd()| and the |:match| commands.
If {win} is specified, use the window with this number or
window ID instead of the current window.
+ Can also be used as a |method|: >
+ GetWin()->clearmatches()
+<
*col()*
col({expr}) The result is a Number, which is the byte index of the column
position given with {expr}. The accepted positions are:
@@ -3146,6 +3155,9 @@ col({expr}) The result is a Number, which is the byte index of the column
\<C-O>:set ve=all<CR>
\<C-O>:echo col(".") . "\n" <Bar>
\let &ve = save_ve<CR>
+
+< Can also be used as a |method|: >
+ GetPos()->col()
<
complete({startcol}, {matches}) *complete()* *E785*
@@ -3177,6 +3189,10 @@ complete({startcol}, {matches}) *complete()* *E785*
< This isn't very useful, but it shows how it works. Note that
an empty string is returned to avoid a zero being inserted.
+ Can also be used as a |method|, the second argument is passed
+ in: >
+ GetMatches()->complete(col('.'))
+
complete_add({expr}) *complete_add()*
Add {expr} to the list of matches. Only to be used by the
function specified with the 'completefunc' option.
@@ -3186,6 +3202,9 @@ complete_add({expr}) *complete_add()*
See |complete-functions| for an explanation of {expr}. It is
the same as one item in the list that 'omnifunc' would return.
+ Can also be used as a |method|: >
+ GetMoreMatches()->complete_add()
+
complete_check() *complete_check()*
Check for a key typed while looking for completion matches.
This is to be used when looking for matches takes some time.
@@ -3246,6 +3265,9 @@ complete_info([{what}])
call complete_info(['mode'])
" Get only 'mode' and 'pum_visible'
call complete_info(['mode', 'pum_visible'])
+
+< Can also be used as a |method|: >
+ GetItems()->complete_info()
<
*confirm()*
confirm({msg} [, {choices} [, {default} [, {type}]]])
@@ -3299,6 +3321,9 @@ confirm({msg} [, {choices} [, {default} [, {type}]]])
don't fit, a vertical layout is used anyway. For some systems
the horizontal layout is always used.
+ Can also be used as a |method|in: >
+ BuildMessage()->confirm("&Yes\n&No")
+
*copy()*
copy({expr}) Make a copy of {expr}. For Numbers and Strings this isn't
different from using {expr} directly.
@@ -3447,6 +3472,8 @@ cursor({list})
position within a <Tab> or after the last character.
Returns 0 when the position could be set, -1 otherwise.
+ Can also be used as a |method|: >
+ GetCursorPos()->cursor()
deepcopy({expr}[, {noref}]) *deepcopy()* *E698*
Make a copy of {expr}. For Numbers and Strings this isn't
@@ -3468,6 +3495,9 @@ deepcopy({expr}[, {noref}]) *deepcopy()* *E698*
{noref} set to 1 will fail.
Also see |copy()|.
+ Can also be used as a |method|: >
+ GetObject()->deepcopy()
+
delete({fname} [, {flags}]) *delete()*
Without {flags} or with {flags} empty: Deletes the file by the
name {fname}. This also works when {fname} is a symbolic link.
@@ -3485,6 +3515,9 @@ delete({fname} [, {flags}]) *delete()*
operation was successful and -1/true when the deletion failed
or partly failed.
+ Can also be used as a |method|: >
+ GetName()->delete()
+
deletebufline({expr}, {first}[, {last}]) *deletebufline()*
Delete lines {first} to {last} (inclusive) from buffer {expr}.
If {last} is omitted then delete line {first} only.
@@ -3499,6 +3532,9 @@ deletebufline({expr}, {first}[, {last}]) *deletebufline()*
when using |line()| this refers to the current buffer. Use "$"
to refer to the last line in buffer {expr}.
+ Can also be used as a |method|: >
+ GetBuffer()->deletebufline(1)
+
dictwatcheradd({dict}, {pattern}, {callback}) *dictwatcheradd()*
Adds a watcher to a dictionary. A dictionary watcher is
identified by three components:
@@ -3565,6 +3601,9 @@ diff_filler({lnum}) *diff_filler()*
line, "'m" mark m, etc.
Returns 0 if the current window is not in diff mode.
+ Can also be used as a |method|: >
+ GetLnum()->diff_filler()
+
diff_hlID({lnum}, {col}) *diff_hlID()*
Returns the highlight ID for diff mode at line {lnum} column
{col} (byte index). When the current line does not have a
@@ -3576,6 +3615,9 @@ diff_hlID({lnum}, {col}) *diff_hlID()*
The highlight ID can be used with |synIDattr()| to obtain
syntax information about the highlighting.
+ Can also be used as a |method|: >
+ GetLnum()->diff_hlID(col)
+
empty({expr}) *empty()*
Return the Number 1 if {expr} is empty, zero otherwise.
A |List| or |Dictionary| is empty when it does not have any
@@ -3776,6 +3818,9 @@ debugbreak({pid}) *debugbreak()*
processes is undefined. See |terminal-debugger|.
{Sends a SIGINT to a process {pid} other than MS-Windows}
+ Can also be used as a |method|: >
+ GetPid()->debugbreak()
+
expand({expr} [, {nosuf} [, {list}]]) *expand()*
Expand wildcards and the following special keywords in {expr}.
'wildignorecase' applies.