KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I use GVim on Windows 7. I want to learn how to put newline characters by using regex substitutions. To do this I try to use \r and \n metacharacters but the substituted text doesn't show normal newlines. For example, at the beginning I have: line 1 line 2 I use the following substitution expression: :%s/\n/\n\n/g Then GVim produces the following text: line 1^@^@line 2^@^@ Instead, if I use \r\n in the substitution expression :%s/\n/\r\n/g Then GVim produces the following text: line 1 ^@line 2 ^@ What are those ^@ characters? How to use newline characters in the substitution expression properly?
Tags (comma-separated)
Save Edits
Cancel