>I've got a file with some control characters and I want to replace
>one of them with a new line. I've tried:
>:s/\%x03/\n/
>:s/\%x03/^M^J/
>:s/\%x03/\%x0a/
In the search-for field, you can use '\n' to search for a newline and
span more than one line.
In the replace-with field, you need to use '\r' instead. Something
about the way 'vi' variants store lines internally, that each string is
null-terminated and there doesn't exist an explicit newline char, so you
need to insert a return char (the '\r') in the replace-with field to
tell it to split the line.
Soooo
:s/^V^C/\r/ <-- ctl-V ctl-C is shorter,
else the "\%x03" will work fine
should do what you want.
Same with ^B that you aked about earlier, no?