It could be a windows saved file opened in unix/linux problem and I am not quite sure how to solve it.
When I open a file which was previously saved by another developer using windows, my vim buffer some times shows
Trying char-by-char conversion...
In the middle of my file and I am unable to edit the code/text/characters right below this message in my buffer.
Why does it do that and how do I prevent this from happening?
This message comes from the Vim function
mac_string_convert()insrc/os_mac_conv.c. It is accompanied by the following comment:Seems like the file you’re editing contains a byte sequence that cannot be converted to Vim’s internal encoding. It’s hard to offer help without more details, but often, these help:
:set encoding=utf-8:set filencodings?and ensure that the file you’re trying to open is covered, or explicitly specify an encoding with:edit ++enc=... file8g8command can find an illegal UTF-8 sequence, so that you can remove it, in case the file is corrupted. Binary mode:set binary/:edit ++binmay also help.