aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-04-15 19:04:55 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-04-15 19:05:58 +0800
commit9f1d33307270e7d013896aea6042b73d091078f5 (patch)
tree923e8e0ccb2f3766bb5963ec30344bb538d5259d
parentf2a9097d764cf61b9479d7633a9738077f75f43c (diff)
downloadrneovim-9f1d33307270e7d013896aea6042b73d091078f5.tar.gz
rneovim-9f1d33307270e7d013896aea6042b73d091078f5.tar.bz2
rneovim-9f1d33307270e7d013896aea6042b73d091078f5.zip
vim-patch:3f32a5f1601a
Update runtime files and translations https://github.com/vim/vim/commit/3f32a5f1601ab2b0eba0caad00d4c26fb86a02a2 Co-authored-by: Bram Moolenaar <Bram@vim.org>
-rw-r--r--runtime/doc/eval.txt14
1 files changed, 11 insertions, 3 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 072d894aff..dd9137649d 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1417,14 +1417,22 @@ allowing the inclusion of Vim script expressions (see |expr1|). Any
expression returning a value can be enclosed between curly braces. The value
is converted to a string. All the text and results of the expressions
are concatenated to make a new string.
-
+ *E1278*
To include an opening brace '{' or closing brace '}' in the string content
-double it.
+double it. For double quoted strings using a backslash also works. A single
+closing brace '}' will result in an error.
Examples: >
let your_name = input("What's your name? ")
+< What's your name? Peter ~
+>
+ echo
echo $"Hello, {your_name}!"
- echo $"The square root of 9 is {sqrt(9)}"
+< Hello, Peter! ~
+>
+ echo $"The square root of {{9}} is {sqrt(9)}"
+< The square root of {9} is 3.0 ~
+
------------------------------------------------------------------------------
option *expr-option* *E112* *E113*