[NBLUG/talk] changeing line breaks.
E Frank Ball
frankb at efball.com
Sun Oct 19 20:10:04 PDT 2003
On Sun, Oct 19, 2003 at 07:06:16PM -0700, Ron Wickersham wrote:
}
} in going the other way, editing a dos file in vi and keeping it in unix,
} you can do :%s/
} //g and get rid of all the extra carriage returns.
} (you get the
} above with <cont>V followed by <return>).
What will be visable at the : prompt is this:
:%s/^M//g
Where ^M is <ctrl><Enter>, which is made with
<ctrl>v <ctrl><Enter>
} vim has some automatic scheme that usually does the right thing for you,
} but you can force it with :set fileformat unix or :set fileformat dos
} before you save the file.
vim should also show that it's a dos file at the bottom anytime you edit
one.
--
E Frank Ball frankb at efball.com
More information about the talk
mailing list