3

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?

7

Ah, figured it out. To convert to a nice unix format, just use :set ff=unix then :w. See this S/O answer...

1
  • 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 '13 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.