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 1


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.
    – romainl
    Mar 3, 2013 at 8:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.