Why does Vim on windows use \n for searching?

So I was changing code from

foo()
{

to

foo() {

and I noticed that the searching pattern required me to search for \n, but when I tried to replace it with \n I got the ^@ character, and I had to instead replace with \r.

It seems strange to me that I search with \n and replace with \r, any idea why this might be?

For reference my solution was :%s/\n\s*{/ {\r/g

9
задан tzenes 30 September 2010 в 18:25
поделиться