Suppose the content in register b is:
a^Jbcdefg, ^Jhijkl^J^J, I want to format it by substituting
^J with a space to make it looks like this:
a bcdefg, hijkl.
I've consulted many documentations but found no answer. This answer is the closest one on StackExchange.
Here are my commands:
let @b=substitute(@b,'^J',' ','g') let @b=substitute(@b,'\^J',' ','g') let @b=substitute(@b,'NL',' ','g')
I thought maybe the linebreak is not ^ appending J so I just copied it from the register when running
:reg using the mouse manually, but also got a wrong result.
Can I replace the line break with a space? Or remove the line break?