I haven\'t used vim in a Unix system in a while, but as I recall there was no \\r, it was always \\n.
I\'m using gVim under windows and when I search for new
Lookup up:
:set fileformat=unix
:set fileformat=dos
This can be used on either platform to switch to the other encoding.
vim does some messing around with carriage returns (\r) and newlines (\n). For instance, if you're in Unix and vi shows you lines ending in '^M' because they're Windows text files, an easy way to get rid of them is to enter the command
:%s/^V^M/^V^M/g
It doesn't look like it should do anything, but it does.