aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2016-02-21 21:58:58 +0300
committerZyX <kp-pav@yandex.ru>2016-02-21 21:58:58 +0300
commit90cbd70d1a82cbad5f60f43a56e14aab647c0f8a (patch)
tree28c4aa7c06419110e3d5e0b101006268408142d5
parent18d1ba3422d3eac6b863cd53ce635529f81bfce1 (diff)
downloadrneovim-90cbd70d1a82cbad5f60f43a56e14aab647c0f8a.tar.gz
rneovim-90cbd70d1a82cbad5f60f43a56e14aab647c0f8a.tar.bz2
rneovim-90cbd70d1a82cbad5f60f43a56e14aab647c0f8a.zip
documentation: Add notes to eval.txt and vim_diff.txt
-rw-r--r--runtime/doc/eval.txt14
-rw-r--r--runtime/doc/vim_diff.txt2
2 files changed, 14 insertions, 2 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 766dafd1d7..b1131ad4db 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -6221,12 +6221,22 @@ string({expr}) Return {expr} converted to a String. If {expr} is a Number,
{expr} type result ~
String 'string'
Number 123
- Float 123.123456 or 1.123456e8
- Funcref function('name')
+ Float 123.123456 or 1.123456e8 or
+ `str2float('inf')`
+ Funcref `function('name')`
List [item, item]
Dictionary {key: value, key: value}
Note that in String values the ' character is doubled.
Also see |strtrans()|.
+ Note 2: Output format is mostly compatible with YAML, except
+ for infinite and NaN floating-point values representations
+ which use |str2float()|. Strings are also dumped literally,
+ only single quote is escaped, which does not allow using YAML
+ for parsing back binary strings (including text when
+ 'encoding' is not UTF-8). |eval()| should always work for
+ strings and floats though and this is the only official
+ method, use |msgpackdump()| or |json_encode()| if you need to
+ share data with other application.
*strlen()*
strlen({expr}) The result is a Number, which is the length of the String
diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt
index 6609a96e9e..47dd48a93d 100644
--- a/runtime/doc/vim_diff.txt
+++ b/runtime/doc/vim_diff.txt
@@ -94,6 +94,8 @@ are always available and may be used simultaneously in separate plugins. The
Same thing applies to |string()| (though it uses construct like
"{E724@level}"), but this is not reliable because |string()| continues to
error out.
+4. Stringifyed infinite and NaN values now use |str2float()| and can be evaled
+ back.
Viminfo text files were replaced with binary (messagepack) ShaDa files.
Additional differences: