In VIM, if you do: :echo 'this is a test' strftime('%c')
you get: this is a test Wed ...
I.e., it concats the strings together, but with a space between. Removing the space from the command line: :echo 'this is a test'strftime('%c')
does not help. It still concats with a space.
Is there a way to concat without the space?
Note: I would normally try to look this up in the VIM help, but it is hard
to search for stuff related to the basic syntax of the language. What
would you search on?
In VIM, if you do: :echo 'this is a test' strftime('%c')
you get: this is a test Wed ...
I.e., it concats the strings together, but with a space between. Removing the space from the command line: :echo 'this is a test'strftime('%c')
does not help. It still concats with a space.
Is there a way to concat without the space?
Note: I would normally try to look this up in the VIM help, but it is hard
to search for stuff related to the basic syntax of the language. What
would you search on?
In VIM, if you do: :echo 'this is a test' strftime('%c')
you get: this is a test Wed ...
Is there a way to concat without the space?
In VIM, if you do: :echo 'this is a test' strftime('%c')
you get: this is a test Wed ...
Is there a way to concat without the space?
gazelle@shell.xmission.com (Kenny McCormack) writes:
In VIM, if you do: :echo 'this is a test' strftime('%c')
you get: this is a test Wed ...
Is there a way to concat without the space?
According to ':h echo' in vim, each expression is printed with a space >between, so it doesn't look like it.
According to other posters downthread, 'echon' solves the problem, for
echo. But (and this is critical), 'echo' is not the point. I was only
using echo for demonstration purposes.
I actually came across this problem in another context, that did not
involve echo. I found that I always got the extra space in there.
So, there needs to be a way to do string concatenation that does not insert the space.
gazelle@shell.xmission.com (Kenny McCormack) writes:
In VIM, if you do: :echo 'this is a test' strftime('%c')
you get: this is a test Wed ...
Is there a way to concat without the space?
According to ':h echo' in vim, each expression is printed with a space between, so it doesn't look like it.
In article <20231129082426.511@kylheku.com>,
Kaz Kylheku <433-929-6894@kylheku.com> wrote:
On 2023-11-29, Tom Furie <tom@furie.org.uk> wrote:
gazelle@shell.xmission.com (Kenny McCormack) writes:
In VIM, if you do: :echo 'this is a test' strftime('%c')
you get: this is a test Wed ...
Is there a way to concat without the space?
According to ':h echo' in vim, each expression is printed with a space
between, so it doesn't look like it.
Expressions in Vim can be catenated with the dot operator.
For instance :echo "a" . "b" prints ab for me.
Thank you!
Yes, that jogs my memory. I had used . previously, but it has been a long time.
Note: Normally, I would post this (only) to comp.editors, but (at least on
my server) comp.editors is destroyed by the Google spam and is unusable.
So, if you respond (post) to comp.editors (only), I won't see it. I am reading/posting only via the "shell" group.
In VIM, if you do: :echo 'this is a test' strftime('%c')
you get: this is a test Wed ...
I.e., it concats the strings together, but with a space between. Removing the space from the command line: :echo 'this is a test'strftime('%c')
does not help. It still concats with a space.
Is there a way to concat without the space?
Note: I would normally try to look this up in the VIM help, but it is hard
to search for stuff related to the basic syntax of the language. What
would you search on?
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 297 |
Nodes: | 16 (2 / 14) |
Uptime: | 25:33:37 |
Calls: | 6,668 |
Calls today: | 2 |
Files: | 12,216 |
Messages: | 5,337,682 |