I have text like this:
myvariable = ABCD, EFGH, IJKL, ~subsection1 MNOP, QRST, UVWX, YZ
Which I want to transform to:
myvariable = "ABCD," "EFGH,\n" \ "IJKL,\n" \ "~subsection1\n" \ "MNOP,\n" \ "QRST,\n" \ "UVWX,\n" \ "YZ"
To insert a
" character at the beginning of each line I do the following:
\n" \ at the end of each line is trickier. I tried:
\\n\\" \\ RET
But that results in:
myvariable = ABCD,\n\" \ EFGH,\n" \ ...
So you have to do it this way:
\\n" \\ RET
My thinking was that the
" character had to be escaped with
\, but that's obviously not the case. Why do I have to escape
\ but not