in Hacking

Vi trick to remember

A few days ago I needed to change the line endings of a text file on a Mac. This Mac did not have Textmate (of course).
I guess every unix system has vi:

:set fileformat=unix
:w

that simple :P

btw. This fix, depends on a fileformats setting (available on mosts systems). When there's no fileformat setting the following command can be given:

:%s/<ctrl>-v<enter>//
  • Related Content by Tag