summaryrefslogtreecommitdiff
path: root/runtime/doc/eval.txt
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-04-23 20:52:00 +0000
committerBram Moolenaar <Bram@vim.org>2005-04-23 20:52:00 +0000
commit0cb032ecb8b03d9c387b89c9f26158924f216e67 (patch)
tree90fae818982fa882007e8c077c30c61a08bfeb38 /runtime/doc/eval.txt
parent8fcc0f71a13eaecabb1314e5dc48fe937dd122b0 (diff)
downloadvim-git-0cb032ecb8b03d9c387b89c9f26158924f216e67.tar.gz
updated for version 7.0070
Diffstat (limited to 'runtime/doc/eval.txt')
-rw-r--r--runtime/doc/eval.txt11
1 files changed, 9 insertions, 2 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index a0e446fcb..d9020a741 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 7.0aa. Last change: 2005 Apr 04
+*eval.txt* For Vim version 7.0aa. Last change: 2005 Apr 22
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -338,6 +338,10 @@ Functions that are useful with a List: >
:let s = string(list) " String representation of list
:call map(list, '">> " . v:val') " prepend ">> " to each item
+Don't forget that a combination of features can make things simple. For
+example, to add up all the numbers in a list: >
+ :exe 'let sum = ' . join(nrlist, '+')
+
1.4 Dictionaries ~
*Dictionaries* *Dictionary*
@@ -3719,7 +3723,10 @@ split({expr} [, {pattern}]) *split()*
it makes the function work a bit faster.
To split a string in individual characters: >
:for c in split(mystring, '\zs')
-< The opposite function is |join()|.
+< If you want to keep the separator you can also use '\zs': >
+ :echo split('abc:def:ghi', ':\zs')
+< ['abc:', 'def:', 'ghi'] ~
+ The opposite function is |join()|.
strftime({format} [, {time}]) *strftime()*