So I was changing code from
foo()
{
to
foo() {
and I noticed that the searching pattern required me to searc
I think your problem is due to the fact that Unix-like operating systems like Linux use the newline (aka "linefeed") (0x0A) as the end of line marker, but Windows uses carriage return + newline (0x0D 0x0A). vim is trying to do some sort of mapping to make the Windows two-byte end of line look like a single "end of line".
In a related note, the following command seems to convert a Unix-style file to a Windows one on a Windows machine, and convert a Windows-style file to a Unix one on a Unix machine:
:%s/^V^M/^V^M/g
where ^V
means hold the control key and press the V, and similarly ^M
means hold the control key and press M.