summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-01-17 21:15:58 +0100
committerBram Moolenaar <Bram@vim.org>2016-01-17 21:15:58 +0100
commite9b892ebcd8596bf813793a1eed5a460a9495a28 (patch)
tree209bed14093b4006bc946bbffdedc15d048db039 /runtime
parent25b2b94ea73eff2aeef624d2ba7f59a1a265a0c1 (diff)
downloadvim-git-e9b892ebcd8596bf813793a1eed5a460a9495a28.tar.gz
patch 7.4.1125v7.4.1125
Problem: There is no perleval(). Solution: Add perleval(). (Damien)
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt14
-rw-r--r--runtime/doc/usr_41.txt1
2 files changed, 14 insertions, 1 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index fb6a85144..7b6ce981c 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 7.4. Last change: 2016 Jan 16
+*eval.txt* For Vim version 7.4. Last change: 2016 Jan 17
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1950,6 +1950,7 @@ nextnonblank( {lnum}) Number line nr of non-blank line >= {lnum}
nr2char( {expr}[, {utf8}]) String single char with ASCII/UTF8 value {expr}
or( {expr}, {expr}) Number bitwise OR
pathshorten( {expr}) String shorten directory names in a path
+perleval( {expr}) any evaluate |Perl| expression
pow( {x}, {y}) Float {x} to the power of {y}
prevnonblank( {lnum}) Number line nr of non-blank line <= {lnum}
printf( {fmt}, {expr1}...) String format text
@@ -4778,6 +4779,17 @@ pathshorten({expr}) *pathshorten()*
< ~/.v/a/myfile.vim ~
It doesn't matter if the path exists or not.
+perleval({expr}) *perleval()*
+ Evaluate Perl expression {expr} in scalar context and return
+ its result converted to Vim data structures. If value can't be
+ converted, it returned as string Perl representation.
+ Note: If you want a array or hash, {expr} must returns an
+ reference of it.
+ Example: >
+ :echo perleval('[1 .. 4]')
+< [1, 2, 3, 4]
+ {only available when compiled with the |+perl| feature}
+
pow({x}, {y}) *pow()*
Return the power of {x} to the exponent {y} as a |Float|.
{x} and {y} must evaluate to a |Float| or a |Number|.
diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt
index 2194dc14b..7ef10e3b4 100644
--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -921,6 +921,7 @@ Various: *various-functions*
luaeval() evaluate Lua expression
mzeval() evaluate |MzScheme| expression
+ perleval() evaluate Perl expression (|+perl|)
py3eval() evaluate Python expression (|+python3|)
pyeval() evaluate Python expression (|+python|)
wordcount() get byte/word/char count of buffer