I copied a vimrc file from a windows box running gvim and tried using it on an OSX box. Turns out there are a bunch of characters that my unix vim doesn't like in the file. I assume they're Windows EOL characters or something - doesn't really matter. Anyway, Is there an easy way to remove them all at once, or convert the file to a unix friendly format?
1 Answer
Ah, figured it out. To convert to a nice unix format, just use :set ff=unix
then :w
. See this S/O answer...
-
Or remove them with
:%s/<C-v><Enter>//
. Vim on Windows supports Unix EOL but Vim on Unix doesn't like Windows EOL. It's best to always use Unix EOL.– romainlMar 3, 2013 at 8:11