How do you replace text with a newline in Vim?
Answer
:%s/; /;\r/g
Explanation
In the replacement part, use \r to insert a newline. :%s/; /;\r/g splits semicolon-separated statements onto separate lines.
:%s/; /;\r/g
In the replacement part, use \r to insert a newline. :%s/; /;\r/g splits semicolon-separated statements onto separate lines.