aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/eval.txt
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2016-09-01 18:32:37 +0200
committerGitHub <noreply@github.com>2016-09-01 18:32:37 +0200
commitc6ac4f84b16324b56c38bd2003f037d995262fa1 (patch)
tree5ece44d718f6511d468ac4fe35030a795044999c /runtime/doc/eval.txt
parent0ade1bb7067d0cdb9b059fb66a8c4b868408be9c (diff)
parentacb7c826b3df50bd9825baf3b2ffaaa79c8b80df (diff)
downloadrneovim-c6ac4f84b16324b56c38bd2003f037d995262fa1.tar.gz
rneovim-c6ac4f84b16324b56c38bd2003f037d995262fa1.tar.bz2
rneovim-c6ac4f84b16324b56c38bd2003f037d995262fa1.zip
Merge pull request #4934 from bfredl/api
make the API callable from vimL, rename API functions to common nvim_ prefix
Diffstat (limited to 'runtime/doc/eval.txt')
-rw-r--r--runtime/doc/eval.txt14
1 files changed, 12 insertions, 2 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 03d8f84aa6..92f9a0f656 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -2009,6 +2009,7 @@ msgpackdump({list}) List dump a list of objects to msgpack
msgpackparse({list}) List parse msgpack to a list of objects
nextnonblank({lnum}) Number line nr of non-blank line >= {lnum}
nr2char({expr}[, {utf8}]) String single char with ASCII/UTF8 value {expr}
+nvim_...({args}...) any call nvim |api| functions
or({expr}, {expr}) Number bitwise OR
pathshorten({expr}) String shorten directory names in a path
pow({x}, {y}) Float {x} to the power of {y}
@@ -2208,11 +2209,9 @@ and({expr}, {expr}) *and()*
Example: >
:let flag = and(bits, 0x80)
-
api_info() *api_info()*
Returns Dictionary of |api-metadata|.
-
append({lnum}, {expr}) *append()*
When {expr} is a |List|: Append each item of the |List| as a
text line below line {lnum} in the current buffer.
@@ -5172,6 +5171,17 @@ nr2char({expr}[, {utf8}]) *nr2char()*
characters. nr2char(0) is a real NUL and terminates the
string, thus results in an empty string.
+nvim_...({...}) *nvim_...()* *eval-api*
+ Call nvim |api| functions. The type checking of arguments will
+ be stricter than for most other builtins. For instance,
+ if Integer is expected, a |Number| must be passed in, a
+ |String| will not be autoconverted.
+ Buffer numbers, as returned by |bufnr()| could be used as
+ first argument to nvim_buf_... functions. All functions
+ expecting an object (buffer, window or tabpage) can
+ also take the numerical value 0 to indicate the current
+ (focused) object.
+
or({expr}, {expr}) *or()*
Bitwise OR on the two arguments. The arguments are converted
to a number. A List, Dict or Float argument causes an error.