OS | Format | 키 or ASCII |
---|---|---|
Unix | <LF> (line feed) | ^J or 0x0A |
Mac | <CR> (carriage return) | ^M or 0x0D |
Dos | <CR><LF> | ^M^J or 0x0D0A |
vim +"argdo set ff=<format>" +wqa <files>
unix | ffs=unix,dos |
---|---|
dos / windows | ffs=dos,unix |
mac | ffs=mac,unix,dos |
File contents | Line 1 Line 2 |
unix line-ends, ff=mac | Line 1^JLine 2^J |
unix line-ends, ff=dos | Line 1 Line 2 |
dos line-ends, ff=unix | Line 1^M Line 2^M |
dos line-ends, ff=mac | Line 1 ^JLine 2 ^J |
mac line-ends, ff=unix | Line 1^MLine 2^M |
mac line-ends, ff=dos | Line 1^MLine 2^M |
:e ++ff=mac
/
to remove them.