I use Vim and GIT to develop my project on a Linux / Ubuntu machine. I used to use Windows, which means that the end of the line was in DOS format. Now, having switched to Linux, I always see ^ M confusing / annoying characters at the end of the line. Some people here:
How to convert ^ M linear jump to normal line break in a file opened in vim?
invited me to search / replace or use tools like dos2unix. These are good suggestions, but with a version-controlled project, this means that I have to add unnecessary commits for files after the change, and this is a big task, since it is not worth wasting time on it. So:
Is there a way to make Vim tolerant of this? That is, if the file ends with DOS, it saves it that way and uses its formatting for newlines, newlines, etc.
Rafid source
share