Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
docs:vim:fileformats [2008/08/03 00:25] – external edit 127.0.0.1 | docs:vim:fileformats [2009/06/24 17:39] (current) – billh | ||
---|---|---|---|
Line 6: | Line 6: | ||
< | < | ||
:e ++ff=mac | :e ++ff=mac | ||
+ | </ | ||
+ | |||
+ | If your file **does not** have consistent line endings throughout, you need to force vim to load it a certain way without any assumptions. | ||
+ | < | ||
+ | :set ffs=dos | ||
+ | :e ++ff=dos | ||
+ | </ | ||
+ | In this case you should see vim list [CR missing] in the status line after loading the file. Vim has fixed the line endings for you, so now you can simply do this to save the file and open it as a corrected dos file: | ||
+ | < | ||
+ | :w | ||
+ | :e! | ||
</ | </ | ||