I prefer to use the following command :
You can also use mac or dos to respectively convert your file to macintosh or MS-DOS/MS-Windows file convention. And it does nothing if the file is already in the correct format.
For more information, see the vim help : :help fileformat
Thanks & Regards