Closed apemost closed 3 years ago
Lua offers a string concatenation operator, denoted by "..", but strings can be concatenated with "." in vimscript:
:echo "foo" . "bar"
foobar
String concatenation can be done in vimscript with ..
.
https://vimhelp.org/eval.txt.html#expr6:
For String concatenation ".." is preferred, since "." is ambiguous, it is also
used for |Dict| member access and floating point numbers.
The vim help you linked is for version 7.3.
It seems you are using an early 8.0 version which doesn't have this upgrade in the expression parsing, I'll merge the change, but you need to upgrade your Vim version since many plugins devs (and myself) won't go out of our way to support old version of Vim (5 years old in this case).
Can we add a compatibility check?
Patch 8.1.1114 Problem: Confusing overloaded operator "." for string concatenation. Solution: Add ".." for string concatenation. Also "let a ..= b". Files: src/eval.c, src/testdir/test_eval_stuff.vim, runtime/doc/eval.txt
Compatibility check wouldn't be beneficial since it's adding a lot of logic (check for patch for Neovim and Vim) while the reward is just syntactical.
environment
actual behavior
expected behavior
No errors.
screen shot (if possible)