diff options
author | Sean Dewar <seandewar@users.noreply.github.com> | 2021-07-29 14:05:55 +0100 |
---|---|---|
committer | Sean Dewar <seandewar@users.noreply.github.com> | 2021-09-16 00:14:47 +0100 |
commit | 5fdf741f77c3b6ebed9b5cdc0e9d1043080beb3c (patch) | |
tree | f623f69519eab66cfd5afb0ff9e84c36e69ca1ea /runtime | |
parent | 7e9ea083213c3eb195fbf206f12a3aac1fa29033 (diff) | |
download | rneovim-5fdf741f77c3b6ebed9b5cdc0e9d1043080beb3c.tar.gz rneovim-5fdf741f77c3b6ebed9b5cdc0e9d1043080beb3c.tar.bz2 rneovim-5fdf741f77c3b6ebed9b5cdc0e9d1043080beb3c.zip |
feat(f_msgpackdump): support dumping to Blob
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/eval.txt | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 94be7b595e..013bff3d20 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -2534,7 +2534,7 @@ min({expr}) Number minimum value of items in {expr} mkdir({name} [, {path} [, {prot}]]) Number create directory {name} mode([expr]) String current editing mode -msgpackdump({list}) List dump a list of objects to msgpack +msgpackdump({list} [, {type}]) List/Blob dump 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} @@ -6824,11 +6824,15 @@ mode([expr]) Return a string that indicates the current mode. the leading character(s). Also see |visualmode()|. -msgpackdump({list}) *msgpackdump()* - Convert a list of VimL objects to msgpack. Returned value is - |readfile()|-style list. Example: > +msgpackdump({list} [, {type}]) *msgpackdump()* + Convert a list of VimL objects to msgpack. Returned value is a + |readfile()|-style list. When {type} contains "B", a |Blob| is + returned instead. Example: > call writefile(msgpackdump([{}]), 'fname.mpack', 'b') -< This will write the single 0x80 byte to `fname.mpack` file +< or, using a |Blob|: > + call writefile(msgpackdump([{}], 'B'), 'fname.mpack') +< + This will write the single 0x80 byte to a `fname.mpack` file (dictionary with zero items is represented by 0x80 byte in messagepack). |