Konverze unixdos ve VIMu
Submitted by michal on 14 September, 2007 - 10:11.
To jsem nasel na http://vim.sourceforge.net/tips/tip.php?tip_id=145, tak si to sem znamenam:
:set fileformat=unix
:w
Or to change back the other way:
:set fileformat=dos
:w
It also works for Apple land:
:set fileformat=mac
:w
And to tell the difference:
set statusline=%<%f%h%m%r%=%{&ff}\ %l,%c%V\ %P
Those of us doomed to work in both the Unix and Windows world have many times encountered files that were create/editted on systems other that the one we are on at the time of our edits. We
can easily correct the dreaded '^M' at the end of our Unix lines, or make files have more than one line in DOS by:
:set fileformat=unix
:w
Or to change back the other way:
:set fileformat=dos
:w
It also works for Apple land:
:set fileformat=mac
:w
And to tell the difference:
set statusline=%<%f%h%m%r%=%{&ff}\ %l,%c%V\ %P
