Categories
Vim

How to Change File Format from DOS to UNIX in Vim

Checking file format in Vim

Type “:set ff?” in command mode to see what the file format is.

:set ff?

Changing file format in Vim

If you want to change the file format to Unix, type the following command:

:set ff=unix

Check the result.

:set ff?

Type the following command to change back to Dos format:

:set ff=dos

Leave a Reply

Your email address will not be published. Required fields are marked *