Has anyone had any issues with using the :c// command to add & characters into the selections? I know when using :x// you need to escape regular expression special characters but when using
:c// you do not need to escape them, however for ampersands & they require being escaped.
I was working on a latex file (specifically tables) and discovered this issue, lets say I have the following string
a b c d
I select all spaces by C-v to select the line, then :x/ /c/&/ nothing happens, but with :x/ /c/\&/ it inserts as expected. I think escaping here seems like an inconsistency, unless this is a part of sam, or caveat with lua, or am I missed something.
The issues works for larger trappings too such as a b c, :x/[ ]+/c/ \& / if I want to insert ampersands with spaces around them.
Hello everyone,
Has anyone had any issues with using the
:c//
command to add&
characters into the selections? I know when using:x//
you need to escape regular expression special characters but when using:c//
you do not need to escape them, however for ampersands&
they require being escaped.I was working on a latex file (specifically tables) and discovered this issue, lets say I have the following string
I select all spaces by
C-v
to select the line, then:x/ /c/&/
nothing happens, but with:x/ /c/\&/
it inserts as expected. I think escaping here seems like an inconsistency, unless this is a part of sam, or caveat with lua, or am I missed something.The issues works for larger trappings too such as
a b c
,:x/[ ]+/c/ \& /
if I want to insert ampersands with spaces around them.For context I am running on v0.7 on Debian.
Cheers,