If something like this happens, I would recommend tho check fileencryption
, fileformat
and bomb
in ViM.Compare both files, the one you edited with nano and the one you edited with vim. Open them with vim and check this:
:set bomb?
This is the byte order mark. Usually set when you edit a UTF-8 file with notepad.exe on windows. I often had problems with that.
:set ff?
Fileformat dos
or unix
. dos have different line endings than unix.
:set fenc?
The fileencoding: perhaps one editor changes to latin1 instead of UTF-8.