"%s/\n/sometext/g" does not work well
moistrot opened this issue · comments
I found replace "\n" to some text does not work.
What behavior do you see instead?
@moistrot can you please give us an example of your text that doesn't work well with global replace?
I'll be closing this issue if additional details aren't added in the next week or two, just a heads up :)
sorry so late.
any text has "\n" like this:
abcd
efgh
if we exec "%s/\n/,/g" ,then result "abcd,efgh",but it's not. nothing happend.
you can try it.
Got it, thanks!
Yep, looks like we're doing the find/replace linewise rather than on the whole text. Looking into this some more to see if there's a relatively straightforward way to expand that to go more than linewise.
%s/^/,/g worked well.
Yeah, but this is a broader issue with how \n
interacts with :s
handling in Vico. It means you can't really do multiline find/replace, which is suboptimal. I think I'm nearing a fix.
@Shadowfiend thx!!
Whoops, I merged the multiline :s
fixes into master
a little over a week ago. This should be fixed on master
!