How to replace a character by a newline in Vim
Use \r instead of \n. Substituting by \n inserts a null character into the text. To get a newline, use \r. When searching for a newline, you’d still use \n, however. This asymmetry is due to the fact that \n and \r do slightly different things: \n matches an end of line (newline), whereas \r … Read more