:%s/$/,/ not working as expected
Opened this issue · 2 comments
Hi, I would like to add a comma to the end of each line. In vim I can do ":%s/$/,/". However this does not work the same in sublime. I think it just adds one comma to the very end of the file.
I believe this is due to an issue that is fixed in the latest code, however I don't think it has been packaged yet. The underlying Python regex handling wasn't setting MULTILINE
mode, and as a result $
was matching only at the end of the string (i.e. the end of the file in the case of %s
).
I am using a hand-edited copy of the package that includes the fix, and :%s/$/,/g
works as expected.
The project's GitHub page has instructions for building the package from source, however I haven't tried that myself.
I checked last version from repo. This case still don't work.
And I found another funny bug connected with :s
. :s/$/foo/gc
cause infinite loop of replacements.