til / Newline in vim substitutions When doing substitutions in vim use \r instead of \n. \n inserts a null character in the text while \r will match a carriage return.1 If you are searching for a newline, you’d still use \n. Stack Overflow. (2008-09-16). Link ↩︎