1

When I do this

:s/,/,\n/g

I get all sorts of control characters (rendered as ^@ in cyan in the editor) where I expected line breaks. What is going on? And how can I get vim to insert "\n" without problems?

iconoclast
  • 17,897
  • 10
  • 91
  • 122
  • http://stackoverflow.com/questions/71417/why-is-r-a-newline-for-vim – FDinoff Jul 11 '14 at 19:26
  • 1
    It turns out that my question *is* a duplicate of that one, although you'd never know since they asked their question in a backwards (and I think ungrammatical) way: "replace a character *for* a newline" seems to mean "put a character *in place of* a newline", as in "You can buy a burger *for* a dollar": you're losing the dollar to get a burger, and their grammar implies they're losing the newline and getting another character. It's kind of hard to recognize duplicates when question titles bear no obvious connection to the actual question, or are the inverse of the actual question. – iconoclast Jul 12 '14 at 22:21

0 Answers0