I wanted to understand the behavior of the return path in vim, so I tried to mark the position of the statement. Suppose I have the contents of this file:
Foobar
Running this command :s/\(foo\)\@<!/♠ /g, I got:
♠ f ♠ o ♠ ob ♠ a ♠ r
Why don't I have at the end of the line? Is the anchor not considered a position in this case? ♠$
Instead, if I execute this command :%s/\(bar\)\@<=/♠ /g, I got:
Foobar ♠
Any explanation? and can anyone confirm this behavior?
Vim 7.4 Ubuntu 16.04 LTS
source
share