Normally, a line such as

 :map g :w

would have a literal **`^M`** ending, to allow the user's map-command to complete without having to press <kbd>Enter</kbd>.

If the `.vimrc` is short enough, e.g., consisting only of a few lines, where the majority have **`^M`** endings, vim will guess that the file uses DOS (carriage-return / line-feed) endings, and store updates to the file using that convention -- throughout.

For further reading

 - [File format][1] (Vim wiki)
 - [Convert DOS line endings to Linux line endings in vim][2]


 [1]: http://vim.wikia.com/wiki/File_format
 [2]: http://stackoverflow.com/questions/82726/convert-dos-line-endings-to-linux-line-endings-in-vim